You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm getting a NullPointerException in JWTCreator#validateClaim(List<?>) and JWTCreator#validateClaim(Map<?, ?>) methods when trying to add a null map or list claim.
At the same time, JWTCreator#addClaim(String, Object), that would be called after validation, accepts null values and deletes a claim in this case.
I guess, validation can be performed only on not-null maps and lists.
Please, excuse me for wasting your time if it's an expected behavior.
👋 Thanks for reaching out. I think those 2 methods should keep the behavior of the other withClaim methods. This is, whenever a key is non-null but the value is null, remove that key from the final claims set.
I'll move it to the backlog.
Description
I'm getting a
NullPointerException
inJWTCreator#validateClaim(List<?>)
andJWTCreator#validateClaim(Map<?, ?>)
methods when trying to add anull
map or list claim.At the same time,
JWTCreator#addClaim(String, Object)
, that would be called after validation, acceptsnull
values and deletes a claim in this case.I guess, validation can be performed only on not-null maps and lists.
Please, excuse me for wasting your time if it's an expected behavior.
Reproduction
Code sample for List:
Code sample for Map:
The text was updated successfully, but these errors were encountered: