From: PJ Fanning Date: Fri, 22 Oct 2021 17:05:15 +0000 (+0000) Subject: remove finalizer X-Git-Tag: REL_5_2_0~321 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=7416d8035a8e8c4308bf88c9cef61a8a92f809f7;p=poi.git remove finalizer git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1894484 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SheetDataWriter.java b/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SheetDataWriter.java index 2981bbbad1..b25c5422b8 100644 --- a/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SheetDataWriter.java +++ b/poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SheetDataWriter.java @@ -103,7 +103,10 @@ public class SheetDataWriter implements Closeable { * Create a writer for the sheet data. * * @param fd the file to write to + * @deprecated this method is due to be made non-public, probably protected */ + @Removal(version = "6.0.0") + //make this protected or private in POI 6.0.0 - no need for this to be public public Writer createWriter(File fd) throws IOException { FileOutputStream fos = new FileOutputStream(fd); OutputStream decorated; @@ -188,13 +191,6 @@ public class SheetDataWriter implements Closeable { return _numberLastFlushedRow; } - @Override - protected void finalize() throws Throwable { - if (_fd.exists() && !_fd.delete()) { - LOG.atError().log("Can't delete temporary encryption file: {}", _fd); - } - } - /** * Write a row to the file *