You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2013/10/23 16:31:51 UTC

git commit: CAMEL-6888 fixed the stream copy issue of JcloudsPayloadConverter

Updated Branches:
  refs/heads/camel-2.10.x ec779785b -> e82146f12


CAMEL-6888 fixed the stream copy issue of JcloudsPayloadConverter


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

Branch: refs/heads/camel-2.10.x
Commit: e82146f124e08e56bca30dfdbc7a68bcfba95bbc
Parents: ec77978
Author: Willem Jiang <ni...@apache.org>
Authored: Wed Oct 23 21:20:00 2013 +0800
Committer: Willem Jiang <wi...@gmail.com>
Committed: Wed Oct 23 22:20:44 2013 +0800

----------------------------------------------------------------------
 .../apache/camel/component/jclouds/JcloudsPayloadConverter.java    | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/e82146f1/components/camel-jclouds/src/main/java/org/apache/camel/component/jclouds/JcloudsPayloadConverter.java
----------------------------------------------------------------------
diff --git a/components/camel-jclouds/src/main/java/org/apache/camel/component/jclouds/JcloudsPayloadConverter.java b/components/camel-jclouds/src/main/java/org/apache/camel/component/jclouds/JcloudsPayloadConverter.java
index 4f41197..11e904b 100644
--- a/components/camel-jclouds/src/main/java/org/apache/camel/component/jclouds/JcloudsPayloadConverter.java
+++ b/components/camel-jclouds/src/main/java/org/apache/camel/component/jclouds/JcloudsPayloadConverter.java
@@ -30,6 +30,7 @@ import org.apache.camel.component.file.GenericFile;
 import org.apache.camel.converter.stream.CachedOutputStream;
 import org.apache.camel.converter.stream.StreamSourceCache;
 import org.apache.camel.spi.TypeConverterRegistry;
+import org.apache.camel.util.IOHelper;
 import org.jclouds.io.Payload;
 import org.jclouds.io.payloads.ByteArrayPayload;
 import org.jclouds.io.payloads.FilePayload;
@@ -68,6 +69,7 @@ public final class JcloudsPayloadConverter {
             return payload;
         } else {
             CachedOutputStream cos = new CachedOutputStream(exchange);
+            IOHelper.copy(is, cos);
             return toPayload(cos.getWrappedInputStream(), exchange);
         }
     }