Skip to content

Commit

Permalink
make JsonNodeClaim always return false for isNull invocation
Browse files Browse the repository at this point in the history
  • Loading branch information
lbalmaceda committed Apr 11, 2017
1 parent 9a496ad commit 283b899
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/src/main/java/com/auth0/jwt/impl/JsonNodeClaim.java
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public <T> T as(Class<T> tClazz) throws JWTDecodeException {

@Override
public boolean isNull() {
return !(data.isObject() || data.isArray() || data.canConvertToLong() || data.isTextual() || data.isNumber() || data.isBoolean());
return false;
}

/**
Expand Down
5 changes: 5 additions & 0 deletions lib/src/main/java/com/auth0/jwt/interfaces/Claim.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
*/
public interface Claim {

/**
* Whether this Claim has a null value or not.
*
* @return whether this Claim has a null value or not.
*/
boolean isNull();

/**
Expand Down

0 comments on commit 283b899

Please sign in to comment.