On Mon, 25 May 2026 12:13:50 GMT, Casper Norrbin <[email protected]> wrote:

>> src/hotspot/share/classfile/systemDictionary.cpp line 1214:
>> 
>>> 1212:         }
>>> 1213:       } else {
>>> 1214:         // Pending exceptions are cleared so we can fail silently.
>> 
>> Do we need this branch to attempt to preload?  As long as we have the 
>> classes for the flattened fields, we should be OK.  I would expect the other 
>> classes to be optional at this point
>
> This branch handles the speculative preloading from the `LoadableDescriptors` 
> attribute for non-flat nullable fields, so it is not part of the required 
> flat/null-restricted validation. I kept it to preserve the existing behavior 
> where `LoadableDescriptors` can opportunistically load field classes. These 
> loads are optional, failures are ignored and should not cause the shared 
> loading to fail.

I'm fine with leaving this for now but we should think further about this after 
the merge to mainline.  With CDS, these field classes for non-flat fields will 
be loaded during `ik->link_class()` so this may be additional complexity we can 
simplify

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

PR Review Comment: 
https://git.openjdk.org/valhalla/pull/2409#discussion_r3298577283

Reply via email to