[lworld] RFR: 8376512: [lworld] Value objects should consistently use System.identityHashCode

Roger Riggs rriggs at openjdk.org
Wed Jan 28 13:51:58 UTC 2026


On Tue, 27 Jan 2026 23:12:34 GMT, Chen Liang <liach at openjdk.org> wrote:

>> For value objects, the ValueObjectMethods.valueObjectHashCodeAlt uses System.identityHashCode for all referenced objects.
>
> src/java.base/share/classes/java/lang/runtime/ValueObjectMethods.java line 1467:
> 
>> 1465:      */
>> 1466:     private static int valueObjectHashCodeAlt(Object obj) {
>> 1467:         if (VERBOSE && obj != null) {
> 
> Don't think we need this null check, we would crash right below. Without this check it is still a crash, no debug info is lost.

ok, I think the debug info can be removed with JDK-8372954.

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

PR Review Comment: https://git.openjdk.org/valhalla/pull/1987#discussion_r2736721196


More information about the valhalla-dev mailing list