On Thu, 14 Apr 2022 15:43:42 GMT, Daniel Jeliński <djelin...@openjdk.org> wrote:

>>> @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.

I know.  But if the null condition is not added, a code reader may have to 
search for its usage and make sure null is not passed.  If the usages are in 
the same class, I may not add the checking.  Otherwise, an additional checking 
might save time in the future.

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

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

Reply via email to