On Thu, 15 Jan 2026 00:14:44 GMT, Alex Menkov <[email protected]> wrote:

>> src/jdk.jdi/share/classes/com/sun/tools/jdi/ReferenceTypeImpl.java line 341:
>> 
>>> 339:         return ((modifiers & VMModifiers.IDENTITY) == 0)
>>> 340:             && ((modifiers & VMModifiers.INTERFACE) == 0)
>>> 341:             && ((modifiers & VMModifiers.ABSTRACT) == 0);
>> 
>> ReferenceTypeImpl has isXXX() apis to check these modifiers. We should 
>> probably use them here and add isIdentity().
>> 
>> It's unclear to me why you have to check INTERFACE and ABSTRACT. Isn't 
>> IDENTITY enough, or do interfaces and abstract classes not have the IDENTITY 
>> bit set?
>
> value class can be abstract.

So if you have a value class, the IDENTITY bit will not be set, but if the 
ABSTRCT bit is also set, the above logic produces false, even though it is 
value class and you want it to produce true.

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

PR Review Comment: 
https://git.openjdk.org/valhalla/pull/1834#discussion_r2692730005

Reply via email to