[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:
PJ Fanning 2020-05-28 09:25:15 +00:00
parent 682a17bf57
commit aa2a43e2a2
1 changed files with 1 additions and 1 deletions

View File

@ -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);
} }