mirror of https://github.com/apache/poi.git
[bug-64477] prevent duplicate call to delete temporary file (SXSSF finalizer)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1878227 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
682a17bf57
commit
aa2a43e2a2
|
@ -180,7 +180,7 @@ public class SheetDataWriter implements Closeable {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void finalize() throws Throwable {
|
protected void finalize() throws Throwable {
|
||||||
if (!_fd.delete()) {
|
if (_fd.exists() && !_fd.delete()) {
|
||||||
logger.log(POILogger.ERROR, "Can't delete temporary encryption file: "+_fd);
|
logger.log(POILogger.ERROR, "Can't delete temporary encryption file: "+_fd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue