mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8263233: Update java.net and java.nio to use instanceof pattern variable
Reviewed-by: dfuchs, bpb, chegar, michaelm
This commit is contained in:
parent
3fe8a4661c
commit
fdd3941121
17 changed files with 39 additions and 73 deletions
|
@ -972,9 +972,8 @@ public final class URL implements java.io.Serializable {
|
|||
* {@code false} otherwise.
|
||||
*/
|
||||
public boolean equals(Object obj) {
|
||||
if (!(obj instanceof URL))
|
||||
if (!(obj instanceof URL u2))
|
||||
return false;
|
||||
URL u2 = (URL)obj;
|
||||
|
||||
return handler.equals(this, u2);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue