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

mandy chung mandy.chung at oracle.com
Fri Sep 29 21:45:18 UTC 2017

On 9/29/17 2:38 PM, Peter Levart wrote:
> I think the hotspot has an optimization and detects that finalize() 
> has no bytecodes and treats the object as not needing finalization.

   // Check if this klass has an empty finalize method (i.e. one with 
return bytecode only),
   // in which case we don't have to register objects as finalizable
   if (!_has_empty_finalizer) {
     if (_has_finalizer ||
         (super != NULL && super->has_finalizer())) {


More information about the core-libs-dev mailing list