On Thu, 25 Nov 2021 10:41:32 GMT, Andrey Turbanov <d...@openjdk.java.net> wrote:
>> Valerie Peng has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Updated to use pattern matching with instanceof operator. > > src/java.base/share/classes/java/security/Provider.java line 1295: > >> 1293: Service s = legacyMap.get(key); >> 1294: if (s != null && !s.isValid()) { >> 1295: legacyMap.remove(key); > > I wonder if it's better to use `legacyMap.remove(key, value);` here. What if > another thread put some other value by the same key? Sure, I can do that. ------------- PR: https://git.openjdk.java.net/jdk/pull/6513