On Fri, 26 Aug 2022 13:55:22 GMT, Aleksey Shipilev <sh...@openjdk.org> wrote:

> Look at implementation and figure out what happens if you do:
> 
> 
>  computeHash("SHA-1") = someHash;
>  computeHash("SHA-256") = ...?
> 
> 
> The caching method should actually check the algorithms match.
> 
> Not a bug at this point, since only use SHA-256 today, but this is a landmine 
> ready to fire. 
> 
> Additional testing:
>  - [x] Linux x86_64 release, `java/lang/module` tests

This pull request has now been integrated.

Changeset: a476ec5c
Author:    Aleksey Shipilev <sh...@openjdk.org>
URL:       
https://git.openjdk.org/jdk/commit/a476ec5c81968e9a8cf7fb02f61cc4a5c8c2d520
Stats:     16 lines in 1 file changed: 7 ins; 0 del; 9 mod

8292983: ModuleReferenceImpl.computeHash should record algorithm for cache 
checks

Reviewed-by: alanb, mchung, jpai

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

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

Reply via email to