ppalaga commented on a change in pull request #2682:
URL: https://github.com/apache/camel-quarkus/pull/2682#discussion_r643467231
##########
File path:
extensions/jacksonxml/deployment/src/main/java/org/apache/camel/quarkus/component/jacksonxml/deployment/JacksonxmlProcessor.java
##########
@@ -28,4 +37,21 @@ FeatureBuildItem feature() {
return new FeatureBuildItem(FEATURE);
}
+ @BuildStep
+ ReflectiveClassBuildItem registerJsonView(CombinedIndexBuildItem
combinedIndex) {
+
+ IndexView index = combinedIndex.getIndex();
+ DotName JSON_VIEW = DotName.createSimple(JsonView.class.getName());
+ String[] jsonViews = index.getAnnotations(JSON_VIEW).stream().map(ai
-> ai.value())
+ .filter(p -> AnnotationValue.Kind.ARRAY.equals(p.kind()))
+ .map((Function<? super AnnotationValue, ? extends String>) ai
-> {
+ Type[] annotationType = ai.asClassArray();
+ return annotationType[0].name().toString();
Review comment:
Why are we taking only the first array element into account? IMO all
elements need to be registered for reflection.
--
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:
[email protected]