svn commit: r595763 - /activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/xml/XsltBuilder.java

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r595763 - /activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/xml/XsltBuilder.java

jstrachan-2
Author: jstrachan
Date: Fri Nov 16 10:02:22 2007
New Revision: 595763

URL: http://svn.apache.org/viewvc?rev=595763&view=rev
Log:
minor change to the fix for https://issues.apache.org/activemq/browse/CAMEL-224 - lets copy the headers before we invoke the stylesheet in case they modify them

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

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/xml/XsltBuilder.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/xml/XsltBuilder.java?rev=595763&r1=595762&r2=595763&view=diff
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/xml/XsltBuilder.java (original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/xml/XsltBuilder.java Fri Nov 16 10:02:22 2007
@@ -74,9 +74,12 @@
         Source source = getSource(exchange);
         ResultHandler resultHandler = resultHandlerFactory.createResult();
         Result result = resultHandler.getResult();
-        transformer.transform(source, result);
+
+        // lets copy the headers before we invoke the transform in case they modify them
         Message out = exchange.getOut(true);
         out.copyFrom(exchange.getIn());
+
+        transformer.transform(source, result);
         resultHandler.setBody(out);
     }