On Thu, 15 Oct 2026 07:49:20 GMT, Alan Bateman <[email protected]> wrote:
>> 8394501: ImmutableDescriptor.hashCode(), MBeanInfo.hashCode() and >> JMXServiceURL.toString() read a racily initialized field twice >> >> >> --------- >> - [x] I confirm that I make this contribution in accordance with the >> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). > > src/java.management/share/classes/javax/management/ImmutableDescriptor.java > line 377: > >> 375: public int hashCode() { >> 376: int hash = hashCode; >> 377: if (hash == -1) { > > The changes to all 3 looks good, I'm just wondering why -1 is used as the > "not set" rather than 0. Thanks @AlanBateman and @kevinjwalls for looking into this. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/33368#discussion_r4288116679
