RFR: 8284694: Avoid evaluating SSLAlgorithmConstraints twice [v2]

Daniel Fuchs dfuchs at openjdk.java.net
Thu Apr 14 09:03:16 UTC 2022


On Thu, 14 Apr 2022 04:24:07 GMT, Xue-Lei Andrew Fan <xuelei at openjdk.org> wrote:

>> Daniel Jeliński has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Avoid nesting SSLAlgorithmConstraints
>
> 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 `&&`) ?

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

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



More information about the security-dev mailing list