[lworld] RFR: 8373202: [lworld] ObjectReference.equals should follow == semantics for value objects

Serguei Spitsyn sspitsyn at openjdk.org
Mon Jan 12 22:32:17 UTC 2026


On Thu, 18 Dec 2025 23:14:29 GMT, Alex Menkov <amenkov at openjdk.org> wrote:

>> src/jdk.jdwp.agent/share/native/libjdwp/ObjectReferenceImpl.c line 430:
>> 
>>> 428:     {isSameObjectImpl, "IsSameObject"},
>>> 429:     {objectHashCodeImpl, "ObjectHashCode"}
>>> 430: };
>> 
>> I'd suggest to keep current naming convention (just first letter is changed to capital):
>>    referenceType        <=> ReferenceType
>>    disableCollection   <=> DisableCollection
>>    referringObjects    <=> ReferringObjects
>>    isSameObjectIs     <=> SameObject
>>    objectHashCode   <=> ObjectHashCode
>> Then the existing objectHashCode needs to be renamed to something else.
>
> We have isSameObject too (and it's used in many places)

Yes, the same.

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

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


More information about the valhalla-dev mailing list