[lworld] RFR: 8373202: [lworld] ObjectReference.equals should follow == semantics for value objects [v4]
Serguei Spitsyn
sspitsyn at openjdk.org
Wed Jan 21 04:35:56 UTC 2026
On Fri, 16 Jan 2026 22:11:21 GMT, Alex Menkov <amenkov at openjdk.org> wrote:
>> Updated implementation of ObjectReference.equals and ObjectReference.hashCode to comply the spec for value objects.
>> Added the test for value object ctor debugging, the test verifies the behaviour is expected.
>> There is an issue with instance filter, it till be fixed separately (it's not yet clear how it would be better to fix it)
>>
>> testing: tier1..4, hs-tier5-svc
>
> Alex Menkov has updated the pull request incrementally with one additional commit since the last revision:
>
> space
src/java.se/share/data/jdwp/jdwp.spec line 1830:
> 1828: (Error VM_DEAD)
> 1829: )
> 1830: )
As we discussed, "since" is needed and with possible preview comment (check what we had for Loom preview).
src/jdk.jdi/share/classes/com/sun/tools/jdi/ObjectReferenceImpl.java line 170:
> 168: throw exc.toJDIException();
> 169: }
> 170: }
Nit: The lines 164, 177 can be simplified a little bit with move of the renamed `vm.canUseIsSameObject()` check equivalent to the `isValueClass()`.
src/jdk.jdi/share/classes/com/sun/tools/jdi/VirtualMachineImpl.java line 841:
> 839: return versionInfo().jdwpMajor >= 27;
> 840: }
> 841:
Nit: We may want to generalize this with something like 'maySupportValueClasses()'.
-------------
PR Review Comment: https://git.openjdk.org/valhalla/pull/1834#discussion_r2710915871
PR Review Comment: https://git.openjdk.org/valhalla/pull/1834#discussion_r2710925978
PR Review Comment: https://git.openjdk.org/valhalla/pull/1834#discussion_r2710919494
More information about the valhalla-dev
mailing list