LinkedHashMap (addEntry): Call remove() with key argument, not the HashEntry.
authorBryce McKinlay <mckinlay@redhat.com>
Sat, 19 Feb 2005 03:18:20 +0000 (03:18 +0000)
committerBryce McKinlay <bryce@gcc.gnu.org>
Sat, 19 Feb 2005 03:18:20 +0000 (03:18 +0000)
2005-02-18  Bryce McKinlay  <mckinlay@redhat.com>

* java/util/LinkedHashMap (addEntry): Call remove() with key argument,
not the HashEntry. Reported by Jean-Marie White.

From-SVN: r95263

libjava/ChangeLog
libjava/java/util/LinkedHashMap.java

index a81a389ff19e422cbffe3831dc691b50575bd294..808f5273589063435f969b2626d5ca08f5209a0b 100644 (file)
@@ -1,3 +1,8 @@
+2005-02-18  Bryce McKinlay  <mckinlay@redhat.com>
+
+       * java/util/LinkedHashMap (addEntry): Call remove() with key argument, 
+       not the HashEntry. Reported by Jean-Marie White.
+
 2005-02-18  Tom Tromey  <tromey@redhat.com>
 
        PR java/20056:
index 0a8484bae8867a8d79d54eb29abdbac0d56229b7..f58cf3fe70e7d80d6967d52d3295c3e7bb391e5e 100644 (file)
@@ -412,7 +412,7 @@ public class LinkedHashMap extends HashMap
     e.next = buckets[idx];
     buckets[idx] = e;
     if (callRemove && removeEldestEntry(root))
-      remove(root);
+      remove(root.key);
   }
 
   /**