On Wed, 7 Sep 2022 23:38:53 GMT, Valerie Peng <valer...@openjdk.org> wrote:

>> Existing provider filtering code only handles two standard attribute 
>> "KeySize" and "ImplementedIn", the rest are compared by exact match. Over 
>> time, more standard attributes are added which contain multiple values 
>> separated by "|". We should enhance the provider filtering code to better 
>> compare these.
>> 
>> Documentation update for this is tracked separately under 
>> https://bugs.openjdk.org/browse/JDK-6447817.
>> 
>> Thanks in advance for review~
>
> Valerie Peng has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   More refactoring

One problem. One suggestion.

src/java.base/share/classes/java/security/Security.java line 610:

> 608:             // return null if the selection criteria is empty; this is 
> to match
> 609:             // earlier behavior
> 610:             return null;

Is this true? In the original code when `filter` is empty, `keySet` is also 
empty and `allProviders` will be returned.

src/java.base/share/classes/java/security/Security.java line 873:

> 871:         // whose value may be composite, i.e. multiple values separated 
> by "|"
> 872:         private boolean isCompositeValue() {
> 873:             return (attrName != null &&

`attrName` is never null when this method is called.

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

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

Reply via email to