This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new 416b5857bc6e CAMEL-24162: Fix moduleClassNames typo in 
JacksonXMLDataFormatReifier (#24811)
416b5857bc6e is described below

commit 416b5857bc6edad70a0c2f12cac072ce24f5d4b9
Author: Federico Mariani <[email protected]>
AuthorDate: Fri Jul 17 14:52:40 2026 +0200

    CAMEL-24162: Fix moduleClassNames typo in JacksonXMLDataFormatReifier 
(#24811)
    
    Co-authored-by: Claude Opus 4.6 (1M context) <[email protected]>
---
 .../JacksonXMLModuleClassNamesReifierTest.java     | 58 ++++++++++++++++++++++
 .../dataformat/JacksonXMLDataFormatReifier.java    |  2 +-
 2 files changed, 59 insertions(+), 1 deletion(-)

diff --git 
a/components/camel-jacksonxml/src/test/java/org/apache/camel/component/jacksonxml/JacksonXMLModuleClassNamesReifierTest.java
 
b/components/camel-jacksonxml/src/test/java/org/apache/camel/component/jacksonxml/JacksonXMLModuleClassNamesReifierTest.java
new file mode 100644
index 000000000000..2099149cf2d5
--- /dev/null
+++ 
b/components/camel-jacksonxml/src/test/java/org/apache/camel/component/jacksonxml/JacksonXMLModuleClassNamesReifierTest.java
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.jacksonxml;
+
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.model.dataformat.JacksonXMLDataFormat;
+import org.apache.camel.test.junit6.CamelTestSupport;
+import org.junit.jupiter.api.Test;
+
+public class JacksonXMLModuleClassNamesReifierTest extends CamelTestSupport {
+
+    @Test
+    public void testModuleClassNamesViaModel() throws Exception {
+        MockEndpoint mock = getMockEndpoint("mock:marshal");
+        mock.expectedMessageCount(1);
+        mock.message(0).body(String.class)
+                
.isEqualTo("<TestOtherPojo><my-name>Camel</my-name><my-country>Denmark</my-country></TestOtherPojo>");
+
+        TestOtherPojo pojo = new TestOtherPojo();
+        pojo.setName("Camel");
+        pojo.setCountry("Denmark");
+
+        template.sendBody("direct:marshal", pojo);
+
+        MockEndpoint.assertIsSatisfied(context);
+    }
+
+    @Override
+    protected RouteBuilder createRouteBuilder() {
+        return new RouteBuilder() {
+
+            @Override
+            public void configure() {
+                JacksonXMLDataFormat format = new JacksonXMLDataFormat();
+                
format.setModuleClassNames("org.apache.camel.component.jacksonxml.MyModule");
+                format.setInclude("NON_NULL");
+
+                from("direct:marshal").marshal(format).to("mock:marshal");
+            }
+        };
+    }
+
+}
diff --git 
a/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/dataformat/JacksonXMLDataFormatReifier.java
 
b/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/dataformat/JacksonXMLDataFormatReifier.java
index f2c2a669dcdb..96f16f23489e 100644
--- 
a/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/dataformat/JacksonXMLDataFormatReifier.java
+++ 
b/core/camel-core-reifier/src/main/java/org/apache/camel/reifier/dataformat/JacksonXMLDataFormatReifier.java
@@ -39,7 +39,7 @@ public class JacksonXMLDataFormatReifier extends 
DataFormatReifier<JacksonXMLDat
         properties.put("collectionType", or(definition.getCollectionType(), 
definition.getCollectionTypeName()));
         properties.put("useList", definition.getUseList());
         properties.put("enableJaxbAnnotationModule", 
definition.getEnableJaxbAnnotationModule());
-        properties.put("modulesClassNames", definition.getModuleClassNames());
+        properties.put("moduleClassNames", definition.getModuleClassNames());
         properties.put("moduleRefs", definition.getModuleRefs());
         properties.put("enableFeatures", definition.getEnableFeatures());
         properties.put("disableFeatures", definition.getDisableFeatures());

Reply via email to