You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2021/08/02 18:26:57 UTC

[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #2972: jolt: remove the DeepCopySubstitution in favor of Quarkus serializati…

ppalaga commented on a change in pull request #2972:
URL: https://github.com/apache/camel-quarkus/pull/2972#discussion_r681182354



##########
File path: extensions/jolt/deployment/src/main/java/org/apache/camel/quarkus/component/jolt/deployment/JoltProcessor.java
##########
@@ -36,5 +36,15 @@ void registerReflectiveClasses(BuildProducer<ReflectiveClassBuildItem> producer)
         ChainrEntry.STOCK_TRANSFORMS.values().stream().forEach(c -> {
             producer.produce(new ReflectiveClassBuildItem(false, false, c));
         });
+
+        // A JOLT Defaultr transformation spec is a JSON content and it needs to be serialized at some point.
+        // As such, we need to register all JSON base types and super types for serialization.
+        producer.produce(new ReflectiveClassBuildItem(false, false, false, true, java.lang.Boolean.class.getName()));
+        producer.produce(new ReflectiveClassBuildItem(false, false, false, true, java.lang.Number.class.getName()));
+        producer.produce(new ReflectiveClassBuildItem(false, false, false, true, java.lang.Double.class.getName()));
+        producer.produce(new ReflectiveClassBuildItem(false, false, false, true, java.lang.Integer.class.getName()));
+        producer.produce(new ReflectiveClassBuildItem(false, false, false, true, java.lang.String.class.getName()));
+        producer.produce(new ReflectiveClassBuildItem(false, false, false, true, java.util.AbstractList.class.getName()));
+        producer.produce(new ReflectiveClassBuildItem(false, false, false, true, java.util.ArrayList.class.getName()));

Review comment:
       There is CamelSerializationBuildItem and https://github.com/apache/camel-quarkus/blob/main/extensions-core/core/deployment/src/main/java/org/apache/camel/quarkus/core/deployment/CamelSerializationProcessor.java#L42-L71 that perhaps do 99% of what we need here?
   As far as I can see only ArrayList is missing in CamelSerializationProcessor. Maybe we could add it there and save a couple of lines here?
   
   




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