On Mon, 13 Jul 2026 00:56:22 GMT, Chris Plummer <[email protected]> wrote:
>> src/jdk.jdi/share/classes/com/sun/jdi/ObjectReference.java line 62:
>>
>>> 60: * <cite>The Java Virtual Machine Specification</cite>, with one
>>> exception noted
>>> 61: * below. In particular, two value objects are considered to be the
>>> same if both
>>> 62: * refer to statewise-equivalent value objects (x == y has the value
>>> {@code true}).
>>
>> Did you mean "two ObjectReferences are considered to be the same if ..." ?
>
> I was referring to debuggee side value objects in this case. ObjectReferences
> are identity objects so two ObjectReferences are only "the same" if they are
> literally the same heap objects, just like with any other identity object. As
> noted below, ObjectReferences are considered to be equal (Object.equals()) if
> "==" of the target VM objects evaluates to true.
Then I don't understand the original sentence - it makes it sound like there
are additional value objects. Did you just mean to state what the value object
identity check is? i.e.
> In particular, two value objects are considered to be the same if they are
> state-wise equivalent (`x == y` has the value true)
-------------
PR Review Comment:
https://git.openjdk.org/valhalla/pull/2639#discussion_r3567676977