[jdk18] Integrated: 8279222: Incorrect legacyMap.get in java.security.Provider after JDK-8276660
Aleksey Shipilev
shade at openjdk.java.net
Wed Jan 5 07:32:31 UTC 2022
On Thu, 23 Dec 2021 13:33:26 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
> SonarCloud reports:
> A "Map<ServiceKey, Service>" cannot contain a "String" in a "ServiceKey" type.
>
>
> // clean up old alias if present
> Service prevAliasService = legacyMap.get(aliasAlg);
>
>
> Should be `aliasKey`, like other accesses to `legacyMap`. This code is introduced by [JDK-8276660](https://bugs.openjdk.java.net/browse/JDK-8276660), so it affects JDK 18.
>
> Additional testing:
> - [x] Linux x86_64 fastdebug `jdk_security`
This pull request has now been integrated.
Changeset: 0f4807e8
Author: Aleksey Shipilev <shade at openjdk.org>
URL: https://git.openjdk.java.net/jdk18/commit/0f4807e8fe2468f303b32a6f2dc9ccc7ecad82a1
Stats: 18 lines in 2 files changed: 12 ins; 0 del; 6 mod
8279222: Incorrect legacyMap.get in java.security.Provider after JDK-8276660
Co-authored-by: Valerie Peng <valeriep at openjdk.org>
Reviewed-by: alanb, valeriep
-------------
PR: https://git.openjdk.java.net/jdk18/pull/70
More information about the security-dev
mailing list