classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Patch: FYI: Re: fix to LinkedHashMap.java


From: Bryce McKinlay
Subject: Patch: FYI: Re: fix to LinkedHashMap.java
Date: Fri, 18 Feb 2005 22:15:08 -0500
User-agent: Mozilla Thunderbird 1.0 (X11/20041206)

Thanks for spotting this. We actually have a mauve test case for this but it wasn't enabled due to a tags typo! I'm checking in the following patch.

Bryce


2005-02-18  Bryce McKinlay  <address@hidden>

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

--- java/util/LinkedHashMap.java        6 Nov 2002 14:03:43 -0000       1.6
+++ java/util/LinkedHashMap.java        19 Feb 2005 03:13:42 -0000
@@ -412,7 +412,7 @@
    e.next = buckets[idx];
    buckets[idx] = e;
    if (callRemove && removeEldestEntry(root))
-      remove(root);
+      remove(root.key);
  }

  /**




Eric Blake wrote:

Sorry I haven't cleaned my inbox in a while, you mailed an account I no
longer actively track, since I no longer have time to actively develop on
classpath.  Please send bug reports to the project mailing list, and not
an individual developer, if you want faster response.

According to Jean-Marie White on 11/18/2004 5:44 PM:
Hi Eric,

just a quick note to let you know that I fixed a bug in LinkedHashMap.java.

In method  void addEntry(Object key, Object value, int idx, boolean
callRemove), the remove call should read:

remove(root.key)

and not

remove(root)

(You always remove a map entry by key, not by the entry itself)

This may or may not have been fixed, but thought would let you know anyway.

Thanks for your implementing the class in the first place!!!
jm





reply via email to

[Prev in Thread] Current Thread [Next in Thread]