remove finalizer

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1894484 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
PJ Fanning 2021-10-22 17:05:15 +00:00
parent d72018db13
commit 7416d8035a
1 changed files with 3 additions and 7 deletions

View 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
*