]> source.dussan.org Git - poi.git/commitdiff
remove finalizer
authorPJ Fanning <fanningpj@apache.org>
Fri, 22 Oct 2021 17:05:15 +0000 (17:05 +0000)
committerPJ Fanning <fanningpj@apache.org>
Fri, 22 Oct 2021 17:05:15 +0000 (17:05 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1894484 13f79535-47bb-0310-9956-ffa450edef68

poi-ooxml/src/main/java/org/apache/poi/xssf/streaming/SheetDataWriter.java

index 2981bbbad108c662cad310fa093b54fefb09a996..b25c5422b8f0a9922bde5feff4dd402ab67f4f14 100644 (file)
@@ -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
      *