On Thu, 14 Apr 2022 14:58:24 GMT, Xue-Lei Andrew Fan <xue...@openjdk.org> wrote:

>> src/java.base/share/classes/sun/security/ssl/SSLAlgorithmConstraints.java 
>> line 73:
>> 
>>> 71: 
>>> 72:     static AlgorithmConstraints wrap(AlgorithmConstraints 
>>> userSpecifiedConstraints) {
>>> 73:         if (userSpecifiedConstraints == DEFAULT) {
>> 
>> Maybe, DEFAULT could be returned for null userSpecifiedConstraints.
>> 
>> 
>> -        if (userSpecifiedConstraints == DEFAULT) {
>> +        if (userSpecifiedConstraints == null &&
>> +                 userSpecifiedConstraints== DEFAULT) {
>
>> @XueleiFan did you mean `||` (not `&&`) ?
> 
> Thank you @dfuch.  Yes, it should be "||".

as of today, this method is never called with a `null` argument 
(`SSLConfiguration#userSpecifiedAlgorithmConstraints` is initialized to 
`DEFAULT` and cannot be reset to `null`), but I can add a null check for 
future-proofing.

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

PR: https://git.openjdk.java.net/jdk/pull/8199

Reply via email to