RFR: 8265426: Update java.security to use instanceof pattern variable [v3]

Patrick Concannon pconcannon at openjdk.java.net
Thu May 6 14:42:23 UTC 2021


On Thu, 6 May 2021 13:41:04 GMT, Weijun Wang <weijun at openjdk.org> wrote:

>> Patrick Concannon has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   8265426: Reverted parameter names; removed redundant parenthesis
>
> src/java.base/share/classes/java/security/cert/CertPath.java line 185:
> 
>> 183: 
>> 184:         return other instanceof CertPath that
>> 185:                 && this.type.equals(that.getType())
> 
> I know `type` should never be null but let's change as little as possible by using `that.getType().equals(this.type)`.

Ordering swapped around. See cbf2841

> src/java.base/share/classes/java/security/spec/EllipticCurve.java line 176:
> 
>> 174:                 && (field.equals(other.field)
>> 175:                 && a.equals(other.a)
>> 176:                 && b.equals(other.b));
> 
> I suppose there's no need to put the last 3 checks between "(" and ")".

Parenthesis removed as suggested. See cbf2841

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

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



More information about the security-dev mailing list