On Wed, 2 Sep 2026 18:40:00 GMT, Chen Liang <[email protected]> wrote:

> The identity hash code of value objects currently can produce 0. A zero value 
> is usually not anticipated for System.identityHashCode calls unless the 
> argument is null; the 0 hash also cannot be cached. Thus, we should move away 
> from the 0 hash.
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

This pull request has now been integrated.

Changeset: 39b70c57
Author:    Marc Chevalier <[email protected]>
URL:       
https://git.openjdk.org/jdk/commit/39b70c571e251ed7647b1739c71794f5eae36a33
Stats:     324 lines in 11 files changed: 308 ins; 3 del; 13 mod

8391990: Avoid zero hash for value objects

Reviewed-by: fparain, thartmann, jpai

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

PR: https://git.openjdk.org/jdk/pull/32660

Reply via email to