Author: dkulp Date: Tue Jul 17 13:40:53 2012 New Revision: 1362489 URL: http://svn.apache.org/viewvc?rev=1362489&view=rev Log: Merged revisions 1362486 via git cherry-pick from https://svn.apache.org/repos/asf/cxf/branches/2.6.x-fixes
........ r1362486 | dkulp | 2012-07-17 09:37:05 -0400 (Tue, 17 Jul 2012) | 11 lines Merged revisions 1362484 via git cherry-pick from https://svn.apache.org/repos/asf/cxf/trunk ........ r1362484 | dkulp | 2012-07-17 09:31:27 -0400 (Tue, 17 Jul 2012) | 3 lines [CXF-4356] Make sure close isn't called twice, thus wiping out the temp file prematurely ........ ........ Modified: cxf/branches/2.5.x-fixes/api/src/main/java/org/apache/cxf/io/CachedOutputStream.java Modified: cxf/branches/2.5.x-fixes/api/src/main/java/org/apache/cxf/io/CachedOutputStream.java URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/api/src/main/java/org/apache/cxf/io/CachedOutputStream.java?rev=1362489&r1=1362488&r2=1362489&view=diff ============================================================================== --- cxf/branches/2.5.x-fixes/api/src/main/java/org/apache/cxf/io/CachedOutputStream.java (original) +++ cxf/branches/2.5.x-fixes/api/src/main/java/org/apache/cxf/io/CachedOutputStream.java Tue Jul 17 13:40:53 2012 @@ -464,9 +464,13 @@ public class CachedOutputStream extends } else { try { FileInputStream fileInputStream = new FileInputStream(tempFile) { + boolean closed; public void close() throws IOException { - super.close(); - maybeDeleteTempFile(this); + if (!closed) { + super.close(); + maybeDeleteTempFile(this); + } + closed = true; } }; streamList.add(fileInputStream);
