On Thu, 25 Aug 2022 14:30:01 GMT, Weijun Wang <wei...@openjdk.org> wrote:

>> Valerie Peng has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   update test to use SHA256 and DSA throughout.
>
> src/java.base/share/classes/java/security/Security.java line 599:
> 
>> 597:         // Returns all installed providers
>> 598:         // if the selection criteria is null.
>> 599:         if ((keySet == null) || (allProviders == null)) {
> 
> I'm not sure, but can `keySet` or `allProviders` be null? Or you meant 
> `isEmpty()`?

Both may be null as their javadoc didn't state explicitly what is returned.
This is existing code and it returns null upon empty keySet which I keep the 
same behavior. 
Perhaps for consistency sake, it should also check for the empty keySet 
condition and return allProviders.

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

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

Reply via email to