RFR: 8292983: ModuleReferenceImpl.computeHash should record algorithm for cache checks [v3]
Aleksey Shipilev
shade at openjdk.org
Fri Aug 26 15:06:17 UTC 2022
On Fri, 26 Aug 2022 14:54:22 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> Aleksey Shipilev has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Review comments
>
> src/java.base/share/classes/jdk/internal/module/ModuleReferenceImpl.java line 69:
>
>> 67: // wrap the fields updated at the same time with a record, which carries
>> 68: // the implicit final-field semantics for its members.
>> 69: private record CachedHash(byte[] hash, String algorithm) {}
>
> The comment still seems a bit excessive, maybe drop the last bit "which carries ..." as it is not needed here.
I don't think the comment is excessive. It declares the intent to protects from future "optimization" of flattening the record into the plain fields. But I dropped "which carries".
-------------
PR: https://git.openjdk.org/jdk/pull/10044
More information about the core-libs-dev
mailing list