You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2023/10/03 17:06:18 UTC

[camel] branch saxon created (now 4e26f11e498)

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

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


      at 4e26f11e498 CAMEL-19918: camel-saxon - Using saxon=true does not work.

This branch includes the following new commits:

     new 4e26f11e498 CAMEL-19918: camel-saxon - Using saxon=true does not work.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[camel] 01/01: CAMEL-19918: camel-saxon - Using saxon=true does not work.

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 4e26f11e498609344e137762f5ca01f2379be12c
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Tue Oct 3 19:06:05 2023 +0200

    CAMEL-19918: camel-saxon - Using saxon=true does not work.
---
 .../xpath/XPathLanguageDefaultSettingsTest.xml      |  2 +-
 .../apache/camel/language/xpath/XPathLanguage.java  | 21 +++++++++++++++++----
 2 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/components/camel-saxon/src/test/resources/org/apache/camel/language/xpath/XPathLanguageDefaultSettingsTest.xml b/components/camel-saxon/src/test/resources/org/apache/camel/language/xpath/XPathLanguageDefaultSettingsTest.xml
index b8a811e706f..fa962e1d94a 100644
--- a/components/camel-saxon/src/test/resources/org/apache/camel/language/xpath/XPathLanguageDefaultSettingsTest.xml
+++ b/components/camel-saxon/src/test/resources/org/apache/camel/language/xpath/XPathLanguageDefaultSettingsTest.xml
@@ -27,7 +27,7 @@
   <bean name="saxonFactory" class="net.sf.saxon.xpath.XPathFactoryImpl"/>
 
   <bean name="xpath" class="org.apache.camel.language.xpath.XPathLanguage">
-    <property name="useSaxon" value="true"/>
+    <property name="saxon" value="true"/>
   </bean>
 
   <camelContext xmlns="http://camel.apache.org/schema/spring">
diff --git a/components/camel-xpath/src/main/java/org/apache/camel/language/xpath/XPathLanguage.java b/components/camel-xpath/src/main/java/org/apache/camel/language/xpath/XPathLanguage.java
index e4bac284933..0bb008cf6ac 100644
--- a/components/camel-xpath/src/main/java/org/apache/camel/language/xpath/XPathLanguage.java
+++ b/components/camel-xpath/src/main/java/org/apache/camel/language/xpath/XPathLanguage.java
@@ -35,7 +35,7 @@ public class XPathLanguage extends SingleInputTypedLanguageSupport implements Pr
     private QName resultQName;
     private Class<?> documentType;
     private XPathFactory xpathFactory;
-    private Boolean useSaxon;
+    private Boolean saxon;
     private String objectModelUri;
     private Boolean threadSafety;
     private Boolean logNamespaces;
@@ -97,12 +97,22 @@ public class XPathLanguage extends SingleInputTypedLanguageSupport implements Pr
         this.xpathFactory = xpathFactory;
     }
 
+    @Deprecated
     public void setUseSaxon(Boolean useSaxon) {
-        this.useSaxon = useSaxon;
+        setSaxon(useSaxon);
     }
 
+    @Deprecated
     public Boolean getUseSaxon() {
-        return useSaxon;
+        return getSaxon();
+    }
+
+    public Boolean getSaxon() {
+        return saxon;
+    }
+
+    public void setSaxon(Boolean saxon) {
+        this.saxon = saxon;
     }
 
     public String getObjectModelUri() {
@@ -150,7 +160,7 @@ public class XPathLanguage extends SingleInputTypedLanguageSupport implements Pr
         if (clazz != null) {
             builder.setResultType(clazz);
         }
-        Boolean bool = property(Boolean.class, properties, 3, useSaxon);
+        Boolean bool = property(Boolean.class, properties, 3, saxon);
         if (bool != null) {
             builder.setUseSaxon(bool);
             if (bool) {
@@ -216,6 +226,9 @@ public class XPathLanguage extends SingleInputTypedLanguageSupport implements Pr
             case "useSaxon":
                 setUseSaxon(PropertyConfigurerSupport.property(camelContext, Boolean.class, value));
                 return true;
+            case "saxon":
+                setSaxon(PropertyConfigurerSupport.property(camelContext, Boolean.class, value));
+                return true;
             case "objectmodeluri":
             case "objectModelUri":
                 setObjectModelUri(PropertyConfigurerSupport.property(camelContext, String.class, value));