diff options
Diffstat (limited to 'java/util/HashMap.java')
-rw-r--r-- | java/util/HashMap.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/java/util/HashMap.java b/java/util/HashMap.java index d7a9a7f5b..9d64fecb4 100644 --- a/java/util/HashMap.java +++ b/java/util/HashMap.java @@ -345,7 +345,7 @@ public class HashMap<K, V> extends AbstractMap<K, V> while (e != null) { - if (equals(key, e.key)) + if ((key.hashCode() == e.key.hashCode()) && equals(key, e.key)) { e.access(); // Must call this for bookkeeping in LinkedHashMap. V r = e.value; |