JDK-8279222 : Incorrect legacyMap.get in java.security.Provider after JDK-8276660
  • Type: Bug
  • Component: security-libs
  • Sub-Component: java.security
  • Affected Version: 18,19
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2021-12-23
  • Updated: 2024-07-25
  • Resolved: 2022-01-05
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 17 JDK 18 JDK 19
17.0.13Fixed 18 b30Fixed 19Fixed
Related Reports
Relates :  
Description
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);

This code is introduced by JDK-8276660.
Comments
[jdk17u-fix-request] Approval Request from Dan Lutker Backporting JDK-8276660 to fix issue with Provider registration not taking immediate effect. Ran tier1-4 and reproducer of the issue without a problem. Also pulling in followups of JDK-8292739 and JDK-8279222 as to not introduce bugs. This was not clean and required reverting and re-applying JDK-8254711 to get the correct code.
23-07-2024

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk17u-dev/pull/2730 Date: 2024-07-19 18:46:32 +0000
22-07-2024

verified
25-04-2022

Changeset: 0f4807e8 Author: Aleksey Shipilev <shade@openjdk.org> Date: 2022-01-05 07:29:17 +0000 URL: https://git.openjdk.java.net/jdk/commit/0f4807e8fe2468f303b32a6f2dc9ccc7ecad82a1
06-01-2022

Changeset: 0f4807e8 Author: Aleksey Shipilev <shade@openjdk.org> Date: 2022-01-05 07:29:17 +0000 URL: https://git.openjdk.java.net/jdk18/commit/0f4807e8fe2468f303b32a6f2dc9ccc7ecad82a1
05-01-2022

A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk18/pull/70 Date: 2021-12-23 13:33:26 +0000
23-12-2021