We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5ee97ee commit de603a6Copy full SHA for de603a6
sources/net.sf.j2s.java.core/src/java/util/HashMap.java
@@ -300,14 +300,9 @@ public final V setValue(V newValue) {
300
301
@Override
302
public final boolean equals(Object o) {
303
- if (o == this)
304
- return true;
305
- if (o instanceof Map.Entry) {
306
- Map.Entry<?, ?> e = (Map.Entry<?, ?>) o;
307
- if (Objects.equals(key, e.getKey()) && Objects.equals(value, e.getValue()))
308
309
- }
310
- return false;
+ return (o == this || o instanceof Map.Entry
+ && Objects.equals(key, ((Map.Entry<?, ?>) o).getKey())
+ && Objects.equals(value, ((Map.Entry<?, ?>) o).getValue()));
311
}
312
313
0 commit comments