8265426: Update java.security to use instanceof pattern variable

Reviewed-by: rriggs, weijun, dfuchs
This commit is contained in:
Patrick Concannon 2021-05-07 13:42:40 +00:00
parent 3fcdc50e44
commit 86b8dc9f5b
23 changed files with 85 additions and 165 deletions

View file

@ -124,16 +124,11 @@ public final class URICertStoreParameters implements CertStoreParameters {
*/
@Override
public boolean equals(Object p) {
if (p == null || (!(p instanceof URICertStoreParameters))) {
return false;
}
if (p == this) {
return true;
}
URICertStoreParameters other = (URICertStoreParameters)p;
return uri.equals(other.getURI());
return p instanceof URICertStoreParameters other
&& uri.equals(other.getURI());
}
/**