mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8267110: Update java.util to use instanceof pattern variable
Reviewed-by: lancea, naoto
This commit is contained in:
parent
0a03fc84b3
commit
a52c4ede2f
29 changed files with 142 additions and 266 deletions
|
@ -101,10 +101,9 @@ final class KeyValueHolder<K,V> implements Map.Entry<K,V> {
|
|||
*/
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (!(o instanceof Map.Entry))
|
||||
return false;
|
||||
Map.Entry<?,?> e = (Map.Entry<?,?>)o;
|
||||
return key.equals(e.getKey()) && value.equals(e.getValue());
|
||||
return o instanceof Map.Entry<?, ?> e
|
||||
&& key.equals(e.getKey())
|
||||
&& value.equals(e.getValue());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue