This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Patch: FYI: Re: fix to LinkedHashMap.java
- From: Bryce McKinlay <mckinlay at redhat dot com>
- To: Eric Blake <ebb9 at byu dot net>
- Cc: Jean-Marie White <jmwhite at 2wire dot com>, Classpath list <classpath at gnu dot org>, classpath-patches at gcc dot gnu dot org, java-patches at gcc dot gnu dot org
- Date: Fri, 18 Feb 2005 22:15:08 -0500
- Subject: Patch: FYI: Re: fix to LinkedHashMap.java
- References: <419D41FA.6090005@2wire.com> <42149F3E.6030705@byu.net>
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 <mckinlay@redhat.com>
* 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