camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r1227068 - /camel/trunk/camel-core/src/main/java/org/apache/camel/builder/xml/MessageVariableResolver.java
Date Wed, 04 Jan 2012 08:09:29 GMT
Author: davsclaus
Date: Wed Jan  4 08:09:29 2012
New Revision: 1227068

URL: http://svn.apache.org/viewvc?rev=1227068&view=rev
Log:
CAMEL-4858: XPathBuilder variable resolver for $ should return empty string if no header to
support both JDK and Saxon XPath Engines.

Modified:
    camel/trunk/camel-core/src/main/java/org/apache/camel/builder/xml/MessageVariableResolver.java

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/builder/xml/MessageVariableResolver.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/xml/MessageVariableResolver.java?rev=1227068&r1=1227067&r2=1227068&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/builder/xml/MessageVariableResolver.java
(original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/builder/xml/MessageVariableResolver.java
Wed Jan  4 08:09:29 2012
@@ -94,10 +94,10 @@ public class MessageVariableResolver imp
             }
         }
 
-        // If we can't find an answer we must return void.
-        // We can't return null then the xpath engine will throw a NullPointerException
+        // if we can't find an answer we must return an empty String.
+        // if we return null, then the JDK default XPathEngine will throw an exception
         if (answer == null) {
-            return Void.class;
+            return "";
         } else {
             return answer;
         }



Mime
View raw message