rmannibucau commented on a change in pull request #53: JOHNZON-282: add support for @JsonbTypeAdapter at class level URL: https://github.com/apache/johnzon/pull/53#discussion_r329239758
########## File path: johnzon-jsonb/src/main/java/org/apache/johnzon/jsonb/JsonbAccessMode.java ########## @@ -1033,6 +1037,20 @@ private boolean isNumberType(final Type type) { return Number.class.isAssignableFrom(clazz) || clazz.isPrimitive(); } + private boolean hasRawType(final Type type) { + return Class.class.isInstance(type) || ParameterizedType.class.isInstance(type); Review comment: Hmm, i get the point where java.lang.reflect will highly likely return a Class (oracle jdk guarantees it) but this comes from a reader - which is configurable in the jsonb builder - so potentially a custom PT impl, not java.reflect backed. Any issue harnessing the check (Class.isInstance(pt.getRawType()) to avoid a ClassCastException which would be a regression for end users? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services