[lworld] RFR: 8378375: [lworld] System.identityHashCode for value objects should vary by its class
Roger Riggs
rriggs at openjdk.org
Fri Feb 27 16:16:24 UTC 2026
System.identityHashCode for value instance should include a salt value that varies by class.
This improves the distribution of hashcodes for value classes with similar primitive fields.
The class hashCode is a decent salt value and is readily available.
-------------
Commit messages:
- Merge branch 'lworld' into 8378375-hashcode-use-class-hashcode
- SALT for value objects is the class identityHashCode
Changes: https://git.openjdk.org/valhalla/pull/2169/files
Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=2169&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8378375
Stats: 13 lines in 1 file changed: 0 ins; 12 del; 1 mod
Patch: https://git.openjdk.org/valhalla/pull/2169.diff
Fetch: git fetch https://git.openjdk.org/valhalla.git pull/2169/head:pull/2169
PR: https://git.openjdk.org/valhalla/pull/2169
More information about the valhalla-dev
mailing list