8279222: Incorrect legacyMap.get in java.security.Provider after JDK-8276660

Co-authored-by: Valerie Peng <valeriep@openjdk.org>
Reviewed-by: alanb, valeriep
This commit is contained in:
Aleksey Shipilev 2022-01-05 07:29:17 +00:00
parent f8f9148016
commit 0f4807e8fe
2 changed files with 18 additions and 6 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2022, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -1149,7 +1149,7 @@ public abstract class Provider extends Properties {
switch (opType) {
case ADD:
// clean up old alias if present
Service prevAliasService = legacyMap.get(aliasAlg);
Service prevAliasService = legacyMap.get(aliasKey);
if (prevAliasService != null) {
prevAliasService.removeAlias(aliasAlg);
}