RFR: 8290041: ModuleDescriptor.hashCode is inconsistent [v3]
Alan Bateman
alanb at openjdk.org
Tue Aug 16 06:16:22 UTC 2022
On Tue, 16 Aug 2022 02:08:43 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:
>> Can I please get a review of this change which proposes to fix https://bugs.openjdk.org/browse/JDK-8290041?
>>
>> As noted by the reporter, the current implementation is buggy since the calculation can result in a different value of the hashcode depending on the order of iteration of the `Modifier`s. The commit in this PR changes that computation to produce consistent result irrespective of the order in which the `Modifier`s (enum) is iterated upon.
>>
>> A new test has been added which reproduces the issue and verifies the fix.
>
> Jaikiran Pai has updated the pull request incrementally with one additional commit since the last revision:
>
> Review comments - variable name and imports organization in test
Thanks for the updates, I think it looks good.
-------------
Marked as reviewed by alanb (Reviewer).
PR: https://git.openjdk.org/jdk/pull/9790
More information about the core-libs-dev
mailing list