[lworld] RFR: 8373202: [lworld] ObjectReference.equals should follow == semantics for value objects
Alex Menkov
amenkov at openjdk.org
Thu Jan 15 02:51:27 UTC 2026
On Thu, 15 Jan 2026 02:17:54 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:
>> `isInlined` name (and its implementation) is consistent with hotspot code.
>> This API if required by ObjectReferenceImpl to determine if the reference is a value object (so the class cannot be abstract or interface).
>> To me `IsIdentity` (I think `isValue` is better) should be in `ClassType`, I'm updating ClassTypeImpl, it can be added to ClassType interface later if debuggers really need it).
>
>> isInlined name (and its implementation) is consistent with hotspot code.
> But in the case of JDI we are talking about a potentially external API.
>
>>To me IsIdentity (I think isValue is better) should be in ClassType
> We need to be careful of the use of "value" in JDI since we already have com.sun.jdi.Value, which peculates into all sorts of APIs like ObjectReference.getValue(Field) and BooleanValue. It doesn't help any that we also have Value.type().
ClassType laready has `isEnum()`, so `isValue` looks more consistent.
Maybe `isValueClass`? Anyway it's not too important now (while it's internal API)
-------------
PR Review Comment: https://git.openjdk.org/valhalla/pull/1834#discussion_r2692781368
More information about the valhalla-dev
mailing list