rmannibucau commented on code in PR #141:
URL: https://github.com/apache/johnzon/pull/141#discussion_r3520555656


##########
johnzon-jsonb/src/main/java/org/apache/johnzon/jsonb/JsonbAccessMode.java:
##########
@@ -1051,7 +1051,11 @@ private static <T extends Annotation> T 
getAnnotation(final Parameter param, fin
         if (annotation != null) {
             return annotation;
         }
-        return Meta.findMeta(param.getAnnotations(), api);
+        final T metaAnnotation = Meta.findMeta(param.getAnnotations(), api);
+        if (metaAnnotation != null) {
+            return metaAnnotation;
+        }
+        return Meta.getAnnotation(param.getType(), api);

Review Comment:
   @ArneLimburg not sure what you mean, you mean it is a bug we can't read a 
`@JsonbProperty` from a type? my point was more to add a method in the spirit 
of `org.apache.johnzon.mapper.access.Meta#getIndirectAnnotation` which does 
"read at that location (param) else this one (type)" with meta annotation 
support and use it only for the annotations allowing it like 
`JsonbTypeAdapter`, `JsonbDateFormat`, `JsonbNumberFormat` and 
`JsonbTypeDeserializer` but not `JsonbProperty` and `JohnzonConverter` (they 
all use the same `getAnnotation`).



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to