in src/main/java/org/apache/geronimo/microprofile/impl/jwtauth/cdi/GeronimoJwtAuthExtension.java [295:321]
private Injection(final String name, final Claims claims, final Type type) {
this.name = name;
this.claims = claims;
this.type = type;
Function<Object, Object> transformer;
try {
Claims.valueOf(getClaimName(name, claims));
transformer = identity();
} catch (final IllegalArgumentException iae) {
if (type == String.class) {
transformer = val -> val == null ? null : JsonString.class.cast(val).getString();
} else if (type == Long.class) {
transformer = val -> val == null ? null : JsonNumber.class.cast(val).longValue();
} else {
transformer = identity();
}
}
this.transformer = transformer;
this.runtimeName = getClaimName(name, claims);
{
int result = name.hashCode();
result = 31 * result + claims.hashCode();
hash = 31 * result + type.hashCode();
}
}