On Fri, 26 Jun 2026 22:03:26 GMT, ExE Boss <[email protected]> wrote:

>> Fred pointed out my proposed change actually changes the meaning as my 
>> proposal checks the current class, not the class that defines the finalize 
>> method.  This is different for a finalize method from an abstract value class
>
> A finalizer in an abstract value class should probably still be registered 
> for identity subclasses; as otherwise, changing an abstract identity class 
> with a finalizer to an abstract value class with a finalizer would be a 
> breaking change as long as finalizers continue to exist.

I tend to agree with @ExE-Boss here. Vagaries of finalizers aside, if the 
subclass can be an identity class then the superclass's finalizer should be 
registered for instances of the subclass. Otherwise the JEP needs to state 
clearly that this is the case.

-------------

PR Review Comment: 
https://git.openjdk.org/valhalla/pull/2589#discussion_r3510559281

Reply via email to