RFR: 8284694: Avoid evaluating SSLAlgorithmConstraints twice [v2]
Xue-Lei Andrew Fan
xuelei at openjdk.java.net
Thu Apr 14 15:57:30 UTC 2022
On Thu, 14 Apr 2022 15:43:42 GMT, Daniel Jeliński <djelinski at 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
More information about the security-dev
mailing list