You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by on...@apache.org on 2016/04/12 20:48:31 UTC

svn commit: r1738848 - /poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SheetDataWriter.java

Author: onealj
Date: Tue Apr 12 18:48:31 2016
New Revision: 1738848

URL: http://svn.apache.org/viewvc?rev=1738848&view=rev
Log:
bug 59312: delete temporary files even when the output stream cannot be closed (such as out of disk space IOException)

Modified:
    poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SheetDataWriter.java

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SheetDataWriter.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SheetDataWriter.java?rev=1738848&r1=1738847&r2=1738848&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SheetDataWriter.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SheetDataWriter.java Tue Apr 12 18:48:31 2016
@@ -375,7 +375,12 @@ public class SheetDataWriter {
      * @return true if the file was deleted, false if it wasn't.
      */
     boolean dispose() throws IOException {
-        _out.close();
-        return _fd.delete();
+        final boolean ret;
+        try {
+            _out.close();
+        } finally {
+            ret = _fd.delete();
+        }
+        return ret;
     }
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org