You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "ppalaga (via GitHub)" <gi...@apache.org> on 2023/03/22 11:39:39 UTC

[GitHub] [camel-quarkus] ppalaga commented on a diff in pull request #4677: Fix (jira): Add jira model classes and jackson joda datatype to @BuildStep (2.13.x)

ppalaga commented on code in PR #4677:
URL: https://github.com/apache/camel-quarkus/pull/4677#discussion_r1144664591


##########
extensions/jackson/deployment/src/main/java/org/apache/camel/quarkus/component/jackson/JacksonProcessor.java:
##########
@@ -37,7 +36,9 @@ FeatureBuildItem feature() {
     List<ReflectiveClassBuildItem> registerReflectiveClasses() {
         List<ReflectiveClassBuildItem> items = new ArrayList<>();
         items.add(new ReflectiveClassBuildItem(false, true, "com.fasterxml.jackson.module.jaxb.JaxbAnnotationModule"));
-        items.add(new ReflectiveClassBuildItem(false, false, JsonNode.class));
+        items.add(new ReflectiveClassBuildItem(false, false, com.fasterxml.jackson.databind.JsonNode.class));

Review Comment:
   In the first place, strings allow registering also non-public classes that might be inaccessible from here. Second, a string class name allows to avoid loading the class at build time which might sometimes come in handy, e.g. if the given class initializer does something nasty. Not loading the class may make the build time processing generally faster, but I never collected any numbers. Referencing the classes is of course better for maintenance, because if the class is renamed or removed, the compilation fails.
   



-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org