camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r1412106 - in /camel/trunk: camel-core/src/main/java/org/apache/camel/builder/xml/XPathBuilder.java components/camel-saxon/src/main/java/org/apache/camel/component/xquery/XQueryBuilder.java
Date Wed, 21 Nov 2012 14:02:26 GMT
Author: davsclaus
Date: Wed Nov 21 14:02:25 2012
New Revision: 1412106

URL: http://svn.apache.org/viewvc?rev=1412106&view=rev
Log:
Fixed wrong log in xpath builder, and added more debug logging to xquery builder.

Modified:
    camel/trunk/camel-core/src/main/java/org/apache/camel/builder/xml/XPathBuilder.java
    camel/trunk/components/camel-saxon/src/main/java/org/apache/camel/component/xquery/XQueryBuilder.java

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/builder/xml/XPathBuilder.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/xml/XPathBuilder.java?rev=1412106&r1=1412105&r2=1412106&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/builder/xml/XPathBuilder.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/builder/xml/XPathBuilder.java Wed
Nov 21 14:02:25 2012
@@ -433,7 +433,7 @@ public class XPathBuilder implements Exp
 
         if (objectModelUri != null) {
             xpathFactory = XPathFactory.newInstance(objectModelUri);
-            LOG.info("Using objectModelUri " + objectModelUri + " when created XPathFactory
{}", defaultXPathFactory);
+            LOG.info("Using objectModelUri " + objectModelUri + " when created XPathFactory
{}", xpathFactory);
             return xpathFactory;
         }
 
@@ -1096,7 +1096,7 @@ public class XPathBuilder implements Exp
         if (defaultXPathFactory == null) {
             if (objectModelUri != null) {
                 defaultXPathFactory = XPathFactory.newInstance(objectModelUri);
-                LOG.info("Using objectModelUri " + objectModelUri + " when created XPathFactory
{}", defaultXPathFactory);
+                LOG.info("Using objectModelUri " + objectModelUri + " when created default
XPathFactory {}", defaultXPathFactory);
             }
 
             if (defaultXPathFactory == null) {
@@ -1108,7 +1108,7 @@ public class XPathBuilder implements Exp
                         String uri = ObjectHelper.after(key, ":");
                         if (uri != null) {
                             defaultXPathFactory = XPathFactory.newInstance(uri);
-                            LOG.info("Using system property {} with value {} when created
XPathFactory {}", new Object[]{key, uri, defaultXPathFactory});
+                            LOG.info("Using system property {} with value {} when created
default XPathFactory {}", new Object[]{key, uri, defaultXPathFactory});
                         }
                     }
                 }

Modified: camel/trunk/components/camel-saxon/src/main/java/org/apache/camel/component/xquery/XQueryBuilder.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-saxon/src/main/java/org/apache/camel/component/xquery/XQueryBuilder.java?rev=1412106&r1=1412105&r2=1412106&view=diff
==============================================================================
--- camel/trunk/components/camel-saxon/src/main/java/org/apache/camel/component/xquery/XQueryBuilder.java
(original)
+++ camel/trunk/components/camel-saxon/src/main/java/org/apache/camel/component/xquery/XQueryBuilder.java
Wed Nov 21 14:02:25 2012
@@ -70,8 +70,6 @@ import org.apache.camel.util.ObjectHelpe
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-
-
 /**
  * Creates an XQuery builder.
  * <p/>
@@ -149,12 +147,14 @@ public abstract class XQueryBuilder impl
     }
 
     public List<?> evaluateAsList(Exchange exchange) throws Exception {
+        LOG.debug("evaluateAsList: {} for exchange: {}", expression, exchange);
         initialize(exchange);
 
         return getExpression().evaluate(createDynamicContext(exchange));
     }
 
     public Object evaluateAsStringSource(Exchange exchange) throws Exception {
+        LOG.debug("evaluateAsString: {} for exchange: {}", expression, exchange);
         initialize(exchange);
 
         String text = evaluateAsString(exchange);
@@ -162,6 +162,7 @@ public abstract class XQueryBuilder impl
     }
 
     public Object evaluateAsBytesSource(Exchange exchange) throws Exception {
+        LOG.debug("evaluateAsBytesSource: {} for exchange: {}", expression, exchange);
         initialize(exchange);
 
         byte[] bytes = evaluateAsBytes(exchange);
@@ -169,6 +170,7 @@ public abstract class XQueryBuilder impl
     }
 
     public Node evaluateAsDOM(Exchange exchange) throws Exception {
+        LOG.debug("evaluateAsDOM: {} for exchange: {}", expression, exchange);
         initialize(exchange);
 
         DOMResult result = new DOMResult();
@@ -179,6 +181,7 @@ public abstract class XQueryBuilder impl
     }
 
     public byte[] evaluateAsBytes(Exchange exchange) throws Exception {
+        LOG.debug("evaluateAsBytes: {} for exchange: {}", expression, exchange);
         initialize(exchange);
 
         ByteArrayOutputStream buffer = new ByteArrayOutputStream();
@@ -191,6 +194,7 @@ public abstract class XQueryBuilder impl
     }
 
     public String evaluateAsString(Exchange exchange) throws Exception {
+        LOG.debug("evaluateAsString: {} for exchange: {}", expression, exchange);
         initialize(exchange);
 
         StringWriter buffer = new StringWriter();
@@ -205,6 +209,7 @@ public abstract class XQueryBuilder impl
     }
 
     public boolean matches(Exchange exchange) {
+        LOG.debug("Matches: {} for exchange: {}", expression, exchange);
         try {
             List<?> list = evaluateAsList(exchange);
             return matches(exchange, list);
@@ -213,6 +218,7 @@ public abstract class XQueryBuilder impl
         }
     }
 
+    @Deprecated
     public void assertMatches(String text, Exchange exchange) throws AssertionError {
         List<?> list;
 



Mime
View raw message