On Fri, 9 Jan 2026 17:22:58 GMT, Larry Cable <[email protected]> wrote:
>> src/hotspot/share/oops/instanceKlass.cpp line 2386:
>>
>>> 2384: oop pd = java_lang_Class::protection_domain(k->java_mirror());
>>> 2385:
>>> 2386: if (pd != nullptr && (ik = pd->klass()->is_instance_klass() ?
>>> InstanceKlass::cast(pd->klass()) : nullptr) != nullptr) {
>>
>> Is a non-instance-class possible here??
>
> good question, but I think defensive coding is warranted, and this is not a
> performance sensitive code path IMO,
Here the assertion should replace the runtime check. The (non-null)
protection-domain object has to be an instance of `ProtectionDomain` which is
an `InstanceKlass`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29048#discussion_r2684901184