RFR: 6447816: Provider filtering (getProviders) is not working with OR'd conditions [v5]
Valerie Peng
valeriep at openjdk.org
Tue Sep 6 23:25:55 UTC 2022
On Tue, 6 Sep 2022 14:16:28 GMT, Weijun Wang <weijun at openjdk.org> wrote:
>> Valerie Peng has updated the pull request incrementally with one additional commit since the last revision:
>>
>> more refactoring.
>
> src/java.base/share/classes/java/security/Security.java line 613:
>
>> 611: // For each selection criterion, remove providers
>> 612: // which don't satisfy the criterion from the candidate set.
>> 613: Iterator<Map.Entry<String, String>> iter = entries.iterator();
>
> `for (var e : entries)` is simpler.
>
> Inside the loop, you can also directly return `null` is it's empty. Then there is no need to check for `isEmpty` again outside.
Yup, very good idea. I will apply it. Thanks!
> src/java.base/share/classes/java/security/Security.java line 824:
>
>> 822: private String algName;
>> 823: private String attrName = null;
>> 824: private String attrValue;
>
> Make these `final`.
Sure~
-------------
PR: https://git.openjdk.org/jdk/pull/10008
More information about the security-dev
mailing list