fix claim.isNull() method · GJWT/javaOIDCMsg@9a496ad · GitHub
Skip to content

Commit 9a496ad

Browse files
committed
fix claim.isNull() method
1 parent 1f35900 commit 9a496ad

3 files changed

Lines changed: 76 additions & 9 deletions

File tree

lib/src/main/java/com/auth0/jwt/impl/JsonNodeClaim.java

Lines changed: 1 addition & 1 deletion

lib/src/test/java/com/auth0/jwt/JWTDecoderTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,11 +192,11 @@ public void shouldGetValidClaim() throws Exception {
192192
}
193193

194194
@Test
195-
public void shouldGetNullClaimIfClaimValueIsNull() throws Exception {
195+
public void shouldNotGetNullClaimIfClaimIsEmptyObject() throws Exception {
196196
DecodedJWT jwt = JWTDecoder.decode("eyJhbGciOiJIUzI1NiJ9.eyJvYmplY3QiOnt9fQ.d3nUeeL_69QsrHL0ZWij612LHEQxD8EZg1rNoY3a4aI");
197197
assertThat(jwt, is(notNullValue()));
198198
assertThat(jwt.getClaim("object"), is(notNullValue()));
199-
assertThat(jwt.getClaim("object").isNull(), is(true));
199+
assertThat(jwt.getClaim("object").isNull(), is(false));
200200
}
201201

202202
@Test

lib/src/test/java/com/auth0/jwt/impl/JsonNodeClaimTest.java

Lines changed: 73 additions & 6 deletions

0 commit comments

Comments
 (0)