LinkedHashMap.removeEldestEntry
Bryce McKinlay
mckinlay@redhat.com
Tue Feb 22 12:11:00 GMT 2005
Thomas Hallgren wrote:
> I might have encontered a bug. I Can't find any mention of it in
> bugzilla and my GCJ is not the latest so I'll ask here before filing.
>
> I have an implementation of a MRU cache that uses a LinkedHashMap
> specialization. It overrides the removeEldestEntry method and returns
> true when the map reaches a certain size. That has no effect it seems
> since my map just keep growing. Adding an explicit remove to the
> removeEldestEntry helps (it really should not). I'm using 3.4.2. Is
> this a known issue?
Yes, this is a known bug that was recently fixed. You can either upgrade
to GCC head or apply this patch:
http://gcc.gnu.org/ml/java-patches/2005-q1/msg00466.html
Bryce
More information about the Java
mailing list