Skip to content
Permalink
Browse files
correct handling of null for jsonstring/jsonnumber
  • Loading branch information
rmannibucau committed Apr 21, 2018
1 parent 21804d9 commit 6497675ba0ea59ca1ae284913a6cf17a416c9e1a
Showing 2 changed files with 3 additions and 3 deletions.
@@ -279,9 +279,9 @@ private Injection(final String name, final Claims claims, final Type type) {
transformer = identity();
} catch (final IllegalArgumentException iae) {
if (type == String.class) {
transformer = val -> JsonString.class.cast(val).getString();
transformer = val -> val == null ? null : JsonString.class.cast(val).getString();
} else if (type == Long.class) {
transformer = val -> JsonNumber.class.cast(val).longValue();
transformer = val -> val == null ? null : JsonNumber.class.cast(val).longValue();
} else {
transformer = identity();
}
@@ -14,7 +14,7 @@
<suite name="Microprofile-jwt-auth-TCK (dev)" verbose="1" configfailurepolicy="continue" >
<test name="Tests">
<classes>
<class name="org.eclipse.microprofile.jwt.tck.container.jaxrs.PrimitiveInjectionTest">
<class name="org.eclipse.microprofile.jwt.tck.container.jaxrs.ClaimValueInjectionTest">
</class>
</classes>
</test>

0 comments on commit 6497675

Please sign in to comment.