RFR: 6447816: Provider filtering (getProviders) is not working with OR'd conditions [v2]
Weijun Wang
weijun at openjdk.org
Wed Sep 7 17:27:45 UTC 2022
On Wed, 7 Sep 2022 17:01:32 GMT, Valerie Peng <valeriep at openjdk.org> wrote:
>> The spec for this method:
>>
>> * @return all the installed providers that satisfy the selection
>> * criteria, or {@code null} if no such providers have been installed.
>>
>> My understanding is that you should not return an empty array.
>
> I see that null is returned instead of an empty Provider array. When an empty filter map is specified, I interpret it as no criteria is set and thus it should return all providers (which is often non-empty). The condition on line 599 is OR, but the line on 600 returns the "allProvider" value which may or may not be null. Anyway, I start to get the feeling that we may not be talking about the same stuff...
Maybe. But, while all providers is usually non-empty, it could be if a user remove all of them. I understand this is a just corner case.
-------------
PR: https://git.openjdk.org/jdk/pull/10008
More information about the security-dev
mailing list