RFR: 8358624: ImmutableDescriptor violates equals/hashCode contract after deserialization [v2]

Kevin Walls kevinw at openjdk.org
Wed Jun 25 17:28:13 UTC 2025


On Fri, 20 Jun 2025 17:05:47 GMT, Serguei Spitsyn <sspitsyn at openjdk.org> wrote:

>> Kevin Walls has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains six additional commits since the last revision:
>> 
>>  - Merge remote-tracking branch 'upstream/master' into 8358624_ImmutableDescriptor_hashcode
>>  - spelling
>>  - Exception name
>>  - whitespace
>>  - whitespace
>>  - 8358624: ImmutableDescriptor violates equals/hashCode contract after deserialization
>
> src/java.management/share/classes/javax/management/ImmutableDescriptor.java line 141:
> 
>> 139:             bad = true;
>> 140:         if (!bad) {
>> 141:             hashCode = -1; // Force recalculation
> 
> Nit: Would it make sense to add same comment to the lines: 445, 452,473, 493?

Sure, done!

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25758#discussion_r2167248301


More information about the serviceability-dev mailing list