[jdk18] RFR: 8279222: Incorrect legacyMap.get in java.security.Provider after JDK-8276660

Aleksey Shipilev shade at openjdk.java.net
Thu Dec 23 13:42:44 UTC 2021


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`

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

Commit messages:
 - Fix

Changes: https://git.openjdk.java.net/jdk18/pull/70/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk18&pr=70&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8279222
  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk18/pull/70.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk18 pull/70/head:pull/70

PR: https://git.openjdk.java.net/jdk18/pull/70


More information about the security-dev mailing list