mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8263358: Update java.lang to use instanceof pattern variable
Reviewed-by: iris, chegar, mchung, dfuchs
This commit is contained in:
parent
ae9af57bf6
commit
329697b02e
18 changed files with 63 additions and 112 deletions
|
@ -138,12 +138,9 @@ public final class ResolvedModule {
|
|||
*/
|
||||
@Override
|
||||
public boolean equals(Object ob) {
|
||||
if (!(ob instanceof ResolvedModule))
|
||||
return false;
|
||||
|
||||
ResolvedModule that = (ResolvedModule) ob;
|
||||
return Objects.equals(this.cf, that.cf)
|
||||
&& Objects.equals(this.mref, that.mref);
|
||||
return (ob instanceof ResolvedModule that)
|
||||
&& Objects.equals(this.cf, that.cf)
|
||||
&& Objects.equals(this.mref, that.mref);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue