On Fri, 26 Jun 2026 19:10:50 GMT, Dan Heidinga <[email protected]> wrote:
>> Change in finalizers registration to prevent it for value classes. >> >> Tested tier1-4. >> >> --------- >> - [x] I confirm that I make this contribution in accordance with the >> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). > > src/hotspot/share/classfile/classFileParser.cpp line 4164: > >> 4162: if (InstanceKlass::is_finalization_enabled() && >> 4163: (m != nullptr) && !m->is_empty_method() && >> 4164: m->method_holder()->access_flags().is_identity_class()) { > > Could we call ClassFileParser's ` is_identity_class()` here instead of going > through the method_holder? 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 ------------- PR Review Comment: https://git.openjdk.org/valhalla/pull/2589#discussion_r3483675890
