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
d94ff1aa8e
commit
ecf7db3223
@ -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
Block a user