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 15:42:30 UTC
[2/2] git commit: CAMEL-6888 fixed the stream copy issue of
JcloudsPayloadConverter
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/626a5abb
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/626a5abb
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/626a5abb
Branch: refs/heads/master
Commit: 626a5abb326ccd334ffafa006f9be41b515e1bbe
Parents: edf0e1d
Author: Willem Jiang <ni...@apache.org>
Authored: Wed Oct 23 21:20:00 2013 +0800
Committer: Willem Jiang <ni...@apache.org>
Committed: Wed Oct 23 21:41:47 2013 +0800
----------------------------------------------------------------------
.../apache/camel/component/jclouds/JcloudsPayloadConverter.java | 2 ++
1 file changed, 2 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/626a5abb/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);
}
}