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

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


On Tue, 27 Apr 2021 04:38:32 GMT, Punikekk <github.com+50504152+Punikekk at openjdk.org> wrote:

>> Patrick Concannon has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   8265426: changed order of equals check; refactored Identity.equals method
>
> src/java.base/share/classes/java/security/Identity.java line 345:
> 
>> 343:             if (this.fullName().equals(other.fullName())) {
>> 344:                 return true;
>> 345:             } else {
> 
> Suggestion:

Not really sure what you are suggesting here. Could you clarify?

> src/java.base/share/classes/java/security/Identity.java line 349:
> 
>> 347:             }
>> 348:         }
>> 349:         return false;
> 
> Suggestion:
> 
>         return obj instanceof Identity other
>                 && (this.fullName().equals(other.fullName())
>                 || identityEquals(other));

Hi Punikekk, thanks for your comment. I've refactored as suggested. See cbf2841

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

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



More information about the security-dev mailing list