Author: dkulp Date: Tue Jul 17 14:42:53 2012 New Revision: 1362522 URL: http://svn.apache.org/viewvc?rev=1362522&view=rev Log: Merged revisions 1362489 via git cherry-pick from https://svn.apache.org/repos/asf/cxf/branches/2.5.x-fixes
........ r1362489 | dkulp | 2012-07-17 09:40:53 -0400 (Tue, 17 Jul 2012) | 19 lines 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.4.x-fixes/api/src/main/java/org/apache/cxf/io/CachedOutputStream.java Modified: cxf/branches/2.4.x-fixes/api/src/main/java/org/apache/cxf/io/CachedOutputStream.java URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/api/src/main/java/org/apache/cxf/io/CachedOutputStream.java?rev=1362522&r1=1362521&r2=1362522&view=diff ============================================================================== --- cxf/branches/2.4.x-fixes/api/src/main/java/org/apache/cxf/io/CachedOutputStream.java (original) +++ cxf/branches/2.4.x-fixes/api/src/main/java/org/apache/cxf/io/CachedOutputStream.java Tue Jul 17 14:42:53 2012 @@ -463,9 +463,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);
