This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-compress.git


The following commit(s) were added to refs/heads/master by this push:
     new 77e9b3bc Remove BZip2CompressorOutputStream.finalize() which only 
wrote to std err
77e9b3bc is described below

commit 77e9b3bcf1df9884812b982765eb59c04a5a74f0
Author: Gary Gregory <garydgreg...@gmail.com>
AuthorDate: Fri Mar 17 17:34:37 2023 -0400

    Remove BZip2CompressorOutputStream.finalize() which only wrote to std
    err
---
 src/changes/changes.xml                                       |  4 +++-
 .../compressors/bzip2/BZip2CompressorOutputStream.java        | 11 -----------
 2 files changed, 3 insertions(+), 12 deletions(-)

diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 0d704ea0..e75a3344 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -63,7 +63,7 @@ The <action> type attribute can be add,update,fix,remove.
       <action type="fix" dev="ggregory" due-to="Una, Gary Gregory, Jochen 
Wiedmann, quaternary, Bruno P. Kinoshita">pack200: Fix FileBands misusing 
InputStream#read(byte[]) #360.</action>      
       <action type="fix" issue="COMPRESS-641" dev="ggregory" 
due-to="XenoAmess, Gary Gregory, Bruno P. Kinoshita">Add 
TarArchiveEntry.getLinkFlag() #365.</action>
       <action type="fix" issue="COMPRESS-642" dev="ggregory" due-to="Anton 
Klarén, Gary Gregory">Integer overflow ArithmeticException in 
TarArchiveOutputStream #368.</action>
-      <action type="fix" issue="COMPRESS-642" dev="ggregory" due-to="Anton 
Klarén, Gary 
Gregory">org.apache.commons.compress.archivers.zip.ZipFile.finalize() should 
not write to the std err.</action>
+      <action type="fix" issue="COMPRESS-642" dev="ggregory" due-to="Dominik 
Stadler, Stefan Bodewig, Gary 
Gregory">org.apache.commons.compress.archivers.zip.ZipFile.finalize() should 
not write to std err.</action>
       <!-- ADD -->
       <action type="add" issue="COMPRESS-614" dev="ggregory" due-to="Andre 
Brait, Gary Gregory">Use FileTime for time fields in SevenZipArchiveEntry 
#256.</action>
       <action type="add" issue="COMPRESS-621" dev="ggregory" 
due-to="Glavo">Fix calculation the offset of the first ZIP central directory 
entry #334.</action>
@@ -71,6 +71,8 @@ The <action> type attribute can be add,update,fix,remove.
       <action type="add" issue="COMPRESS-613" dev="ggregory" due-to="Andre 
Brait, Gary Gregory, Bruno P. Kinoshita">Support for extra time data in Zip 
archives #345.</action>      
       <action type="add" issue="COMPRESS-621" dev="ggregory" due-to="Gary 
Gregory">Add 
org.apache.commons.compress.archivers.zip.DefaultBackingStoreSupplier to write 
to a custom folder instead of the default temporary folder.</action>
       <action type="add" issue="COMPRESS-600" dev="ggregory" due-to="Gary 
Gregory, Pascal Davoust">Add capability to configure Deflater strategy in 
GzipCompressorOutputStream: GzipParameters.setDeflateStrategy(int).</action>
+      <!-- REMOVE -->
+      <action type="remove" dev="ggregory" due-to="Gary Gregory">Remove 
BZip2CompressorOutputStream.finalize() which only wrote to std err.</action>
       <!-- UPDATE -->
       <action type="update" dev="ggregory" due-to="Dependabot">Bump 
mockito.version from 4.8.0 to 4.11.0 #328, #331, #340, #348.</action>
       <action type="update" dev="ggregory" due-to="Gary Gregory">Bump pmd from 
6.50.0 to 6.53.0.</action>
diff --git 
a/src/main/java/org/apache/commons/compress/compressors/bzip2/BZip2CompressorOutputStream.java
 
b/src/main/java/org/apache/commons/compress/compressors/bzip2/BZip2CompressorOutputStream.java
index 831f6307..9de8e694 100644
--- 
a/src/main/java/org/apache/commons/compress/compressors/bzip2/BZip2CompressorOutputStream.java
+++ 
b/src/main/java/org/apache/commons/compress/compressors/bzip2/BZip2CompressorOutputStream.java
@@ -571,17 +571,6 @@ public class BZip2CompressorOutputStream extends 
CompressorOutputStream
         bsFinishedWithStream();
     }
 
-    /**
-     * Overridden to warn about an unclosed stream.
-     */
-    @Override
-    protected void finalize() throws Throwable {
-        if (!closed) {
-            System.err.println("Unclosed BZip2CompressorOutputStream detected, 
will *not* close it");
-        }
-        super.finalize();
-    }
-
     public void finish() throws IOException {
         if (!closed) {
             closed = true;

Reply via email to