mirror of https://github.com/apache/poi.git
bug 59312: delete temporary files even when the output stream cannot be closed (such as out of disk space IOException)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1738848 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
fd50426dc6
commit
3a44eba6a2
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue