cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r1126410 - /cxf/trunk/rt/core/src/main/java/org/apache/cxf/attachment/DelegatingInputStream.java
Date Mon, 23 May 2011 09:50:16 GMT
Author: ffang
Date: Mon May 23 09:50:16 2011
New Revision: 1126410

URL: http://svn.apache.org/viewvc?rev=1126410&view=rev
Log:
[CXF-3504]read through DelegatingInputStream when close it, ensure no cache file left on disk
and correctly close the connection.

Modified:
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/attachment/DelegatingInputStream.java

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/attachment/DelegatingInputStream.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/attachment/DelegatingInputStream.java?rev=1126410&r1=1126409&r2=1126410&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/attachment/DelegatingInputStream.java (original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/attachment/DelegatingInputStream.java Mon
May 23 09:50:16 2011
@@ -42,6 +42,10 @@ public class DelegatingInputStream exten
 
     @Override
     public void close() throws IOException {
+        int x = is.read();
+        while (x != -1) {
+            x = is.read();
+        }
         is.close();
         if (!isClosed && deserializer != null) {
             deserializer.markClosed(this);



Mime
View raw message