RFR JDK-8187485: Update Zip implementation to use Cleaner, not finalizers

Roger Riggs Roger.Riggs at Oracle.com
Wed Dec 6 22:45:26 UTC 2017

Hi Sherman,

Looking good.

Deflater(573) and Inflater(398), and ZipFile(890):
    For consistency, where is says "phantom-reachable" in the finalize 
methods it can say "unreachable".

  - line 92: FinalizableZStreamRef  - owner should be final

Regards,  Roger

On 12/4/2017 6:14 PM, Xueming Shen wrote:
> Hi
> Please review the revision to the change for
> JDK-8187485: Update Zip implementation to use Cleaner, not finalizers
> For compatibility with previous jdk releases, in this proposed 
> revision the corresponding
> close()/end() methods will be called when the 
> ZipFile/Inflater/Deflater object has become
> unreachable, if the ZipFile/Inflater/Deflater has been subclassed and 
> its close()/end() method
> has been overridden. In this case, the finalization mechanism is used 
> to clean up the underlying
> resources.  If the ZipFile/Inflater/Deflater has not been subclassed 
> OR the corresponding
> close()/end() method has not been overridden, then the Cleaner 
> mechanism is used to do
> the cleanup.
> issue: https://bugs.openjdk.java.net/browse/JDK-8185582
> webrev: http://cr.openjdk.java.net/~sherman/8185582/webrev
> csr: https://bugs.openjdk.java.net/browse/JDK-8187485
> Thanks,
> Sherman

More information about the core-libs-dev mailing list