camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [5/6] camel git commit: CAMEL-8688: Stream cache now keeps track on number of copies that was spooled to disk, so when the temp file is deleted its only deleted when no longer in use. A file can be shared if using wire tap etc. Thanks to Franz Forsthofer
Date Mon, 04 May 2015 17:59:44 GMT
CAMEL-8688: Stream cache now keeps track on number of copies that was spooled to disk, so when
the temp file is deleted its only deleted when no longer in use. A file can be shared if using
wire tap etc. Thanks to Franz Forsthofer for the patch.


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

Branch: refs/heads/master
Commit: f1c5b5472deca2f435e669c814655dd26e3512f6
Parents: 504b0d8
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Mon May 4 20:02:08 2015 +0200
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Mon May 4 20:02:08 2015 +0200

----------------------------------------------------------------------
 .../camel/component/cxf/converter/CachedCxfPayload.java      | 8 ++++----
 .../camel/component/cxf/converter/CachedCxfPayloadTest.java  | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/f1c5b547/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/converter/CachedCxfPayload.java
----------------------------------------------------------------------
diff --git a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/converter/CachedCxfPayload.java
b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/converter/CachedCxfPayload.java
index d54a026..7cc94a6 100644
--- a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/converter/CachedCxfPayload.java
+++ b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/converter/CachedCxfPayload.java
@@ -92,14 +92,14 @@ public class CachedCxfPayload<T> extends CxfPayload<T> implements
StreamCache {
         }
     }
 
-    private CachedCxfPayload(CachedCxfPayload<T> orig) throws IOException {
+    private CachedCxfPayload(CachedCxfPayload<T> orig, Exchange exchange) throws IOException
{
         super(orig.getHeaders(), new ArrayList<Source>(orig.getBodySources()), orig.getNsMap());
         ListIterator<Source> li = getBodySources().listIterator();
         this.xml = orig.xml;
         while (li.hasNext()) {
             Source source = li.next();
             if (source instanceof StreamCache) {
-                li.set((Source) (((StreamCache) source)).copy());
+                li.set((Source) (((StreamCache) source)).copy(exchange));
             }
         }
     }
@@ -149,8 +149,8 @@ public class CachedCxfPayload<T> extends CxfPayload<T> implements
StreamCache {
     }
 
     @Override
-    public StreamCache copy() throws IOException {
-        return new CachedCxfPayload<T>(this);
+    public StreamCache copy(Exchange exchange) throws IOException {
+        return new CachedCxfPayload<T>(this, exchange);
     }
 
     private static class DelegatingXMLStreamReader implements XMLStreamReader {

http://git-wip-us.apache.org/repos/asf/camel/blob/f1c5b547/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/converter/CachedCxfPayloadTest.java
----------------------------------------------------------------------
diff --git a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/converter/CachedCxfPayloadTest.java
b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/converter/CachedCxfPayloadTest.java
index 6c7618b..6eb096b 100644
--- a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/converter/CachedCxfPayloadTest.java
+++ b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/converter/CachedCxfPayloadTest.java
@@ -84,7 +84,7 @@ public class CachedCxfPayloadTest extends ExchangeTestSupport {
 
         cache.reset();
 
-        CachedCxfPayload clone = (CachedCxfPayload) cache.copy();
+        CachedCxfPayload clone = (CachedCxfPayload) cache.copy(exchange);
         bos = new ByteArrayOutputStream();
         clone.writeTo(bos);
 


Mime
View raw message