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 14:22:50 UTC

[GitHub] [camel-quarkus] aldettinger opened a new pull request #2972: jolt: remove the DeepCopySubstitution in favor of Quarkus serializati…

aldettinger opened a new pull request #2972:
URL: https://github.com/apache/camel-quarkus/pull/2972


   …on support #1433
   
   <!-- Uncomment and fill this section if your PR is not trivial
   [ ] An issue should be filed for the change unless this is a trivial change (fixing a typo or similar). One issue should ideally be fixed by not more than one commit and the other way round, each commit should fix just one issue, without pulling in other changes.
   [ ] Each commit in the pull request should have a meaningful and properly spelled subject line and body. Copying the title of the associated issue is typically enough. Please include the issue number in the commit message prefixed by #.
   [ ] The pull request description should explain what the pull request does, how, and why. If the info is available in the associated issue or some other external document, a link is enough.
   [ ] Phrases like Fix #<issueNumber> or Fixes #<issueNumber> will auto-close the named issue upon merging the pull request. Using them is typically a good idea.
   [ ] Please run mvn process-resources -Pformat (and amend the changes if necessary) before sending the pull request.
   [ ] Contributor guide is your good friend: https://camel.apache.org/camel-quarkus/latest/contributor-guide.html
   -->


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



[GitHub] [camel-quarkus] aldettinger merged pull request #2972: jolt: remove the DeepCopySubstitution in favor of Quarkus serializati…

Posted by GitBox <gi...@apache.org>.
aldettinger merged pull request #2972:
URL: https://github.com/apache/camel-quarkus/pull/2972


   


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



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

Posted by GitBox <gi...@apache.org>.
aldettinger commented on a change in pull request #2972:
URL: https://github.com/apache/camel-quarkus/pull/2972#discussion_r681561954



##########
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:
       Make sense to consider JSON types as common for camel. I've pushed an update in this direction.




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



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

Posted by GitBox <gi...@apache.org>.
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