Author: dkulp
Date: Tue Jul 17 13:37:05 2012
New Revision: 1362486
URL: http://svn.apache.org/viewvc?rev=1362486&view=rev
Log:
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.6.x-fixes/api/src/main/java/org/apache/cxf/io/CachedOutputStream.java
Modified:
cxf/branches/2.6.x-fixes/api/src/main/java/org/apache/cxf/io/CachedOutputStream.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/api/src/main/java/org/apache/cxf/io/CachedOutputStream.java?rev=1362486&r1=1362485&r2=1362486&view=diff
==============================================================================
---
cxf/branches/2.6.x-fixes/api/src/main/java/org/apache/cxf/io/CachedOutputStream.java
(original)
+++
cxf/branches/2.6.x-fixes/api/src/main/java/org/apache/cxf/io/CachedOutputStream.java
Tue Jul 17 13:37:05 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);