RFR: 8276660: Scalability bottleneck in java.security.Provider.getService() [v2]

Valerie Peng valeriep at openjdk.java.net
Thu Nov 25 00:48:02 UTC 2021


On Tue, 23 Nov 2021 08:25:42 GMT, Andrey Turbanov <duke at 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 919:
> 
>> 917: 
>> 918:         Object o = super.remove(key);
>> 919:         if (o != null && o instanceof String && key instanceof String) {
> 
> `o != null` seems redundant here. `o instanceof String` will be false in case of `o == null`

Yup, removed.

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

PR: https://git.openjdk.java.net/jdk/pull/6513


More information about the security-dev mailing list