On Thu, 6 May 2021 11:52:15 GMT, Patrick Concannon <pconcan...@openjdk.org> 
wrote:

>> Hi,
>> 
>> Could someone please review my code for updating the code in the 
>> `java.security` package to make use of the `instanceof` pattern variable?
>> 
>> Kind regards,
>> Patrick
>
> Patrick Concannon has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   8265426: Reverted parameter names; removed redundant parenthesis

Approved. Just some tiny comments. The other suggestion from @Punikekk also 
looks fine. Thanks.

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)`.

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 ")".

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

Marked as reviewed by weijun (Reviewer).

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

Reply via email to