camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1363631 - /camel/branches/camel-2.10.x/camel-core/src/main/java/org/apache/camel/builder/xml/XsltBuilder.java
Date Fri, 20 Jul 2012 03:18:36 GMT
Author: dkulp
Date: Fri Jul 20 03:18:36 2012
New Revision: 1363631

URL: http://svn.apache.org/viewvc?rev=1363631&view=rev
Log:
Merged revisions 1363630 via  git cherry-pick from
https://svn.apache.org/repos/asf/camel/trunk

........
  r1363630 | dkulp | 2012-07-19 23:17:59 -0400 (Thu, 19 Jul 2012) | 3 lines

  If body is an inputstream, leave it that way and use a streamsource that
  the xslt engine can handle in a way it's most comfortable with

........

Modified:
    camel/branches/camel-2.10.x/camel-core/src/main/java/org/apache/camel/builder/xml/XsltBuilder.java

Modified: camel/branches/camel-2.10.x/camel-core/src/main/java/org/apache/camel/builder/xml/XsltBuilder.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-2.10.x/camel-core/src/main/java/org/apache/camel/builder/xml/XsltBuilder.java?rev=1363631&r1=1363630&r2=1363631&view=diff
==============================================================================
--- camel/branches/camel-2.10.x/camel-core/src/main/java/org/apache/camel/builder/xml/XsltBuilder.java
(original)
+++ camel/branches/camel-2.10.x/camel-core/src/main/java/org/apache/camel/builder/xml/XsltBuilder.java
Fri Jul 20 03:18:36 2012
@@ -417,7 +417,9 @@ public class XsltBuilder implements Proc
             return false;
         }
 
-        if (body instanceof Source) {
+        if (body instanceof InputStream) {
+            return true;
+        } else if (body instanceof Source) {
             return false;
         } else if (body instanceof String) {
             return false;
@@ -450,6 +452,9 @@ public class XsltBuilder implements Proc
             return (Source) body;
         }
         Source source = null;
+        if (body instanceof InputStream) {
+            return new StreamSource((InputStream)body);
+        }
         if (body != null) {
             TypeConverter tc = exchange.getContext().getTypeConverterRegistry().lookup(Source.class,
body.getClass());
             if (tc != null) {



Mime
View raw message