camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [1/3] camel git commit: CAMEL-9255: DocumentType not used for XPath predicates in XML DSL. Thanks to Stephan Siano for the patch.
Date Tue, 27 Oct 2015 07:50:44 GMT
Repository: camel
Updated Branches:
  refs/heads/camel-2.15.x d9a19d70c -> 20f7f63c0
  refs/heads/camel-2.16.x 8ad367357 -> a8ecbd9e9
  refs/heads/master 84a7a0536 -> b6c2e1dd2


CAMEL-9255: DocumentType not used for XPath predicates in XML DSL. Thanks to Stephan Siano
for the patch.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/b6c2e1dd
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/b6c2e1dd
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/b6c2e1dd

Branch: refs/heads/master
Commit: b6c2e1dd251d63295273c54e857f9da4bf39b873
Parents: 84a7a05
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Tue Oct 27 08:50:42 2015 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Tue Oct 27 08:50:42 2015 +0100

----------------------------------------------------------------------
 .../java/org/apache/camel/model/language/XPathExpression.java | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/b6c2e1dd/camel-core/src/main/java/org/apache/camel/model/language/XPathExpression.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/model/language/XPathExpression.java
b/camel-core/src/main/java/org/apache/camel/model/language/XPathExpression.java
index 8fc05e4..8f6aadd 100644
--- a/camel-core/src/main/java/org/apache/camel/model/language/XPathExpression.java
+++ b/camel-core/src/main/java/org/apache/camel/model/language/XPathExpression.java
@@ -202,6 +202,13 @@ public class XPathExpression extends NamespaceAwareExpression {
 
     @Override
     public Predicate createPredicate(CamelContext camelContext) {
+        if (documentType == null && documentTypeName != null) {
+            try {
+                documentType = camelContext.getClassResolver().resolveMandatoryClass(documentTypeName);
+            } catch (ClassNotFoundException e) {
+                throw ObjectHelper.wrapRuntimeCamelException(e);
+            }
+        }
         resolveXPathFactory(camelContext);
         return super.createPredicate(camelContext);
     }


Mime
View raw message