RFR: 6447816: Provider filtering (getProviders) is not working with OR'd conditions [v2]

Valerie Peng valeriep at openjdk.org
Wed Sep 7 17:03:47 UTC 2022


On Wed, 7 Sep 2022 01:49:25 GMT, Weijun Wang <weijun at openjdk.org> wrote:

>> Well, it depends on how you interpret an empty filter map. If an empty table is specified, I'd think it means no criteria is set and all providers can be returned as the comment above suggested.
>> As this is a corner case, I am ok with reverting the isEmpty() check to keep the same behavior as before. However, I don't get which part of spec states about returning null for this case?
>
> 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...

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

PR: https://git.openjdk.org/jdk/pull/10008



More information about the security-dev mailing list