Skip to content

Commit 283b899

Browse files
committed
make JsonNodeClaim always return false for isNull invocation
1 parent 9a496ad commit 283b899

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public <T> T as(Class<T> tClazz) throws JWTDecodeException {
102102

103103
@Override
104104
public boolean isNull() {
105-
return !(data.isObject() || data.isArray() || data.canConvertToLong() || data.isTextual() || data.isNumber() || data.isBoolean());
105+
return false;
106106
}
107107

108108
/**

lib/src/main/java/com/auth0/jwt/interfaces/Claim.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@
1010
*/
1111
public interface Claim {
1212

13+
/**
14+
* Whether this Claim has a null value or not.
15+
*
16+
* @return whether this Claim has a null value or not.
17+
*/
1318
boolean isNull();
1419

1520
/**

0 commit comments

Comments
 (0)