classpath-patches
[Top][All Lists]
Advanced

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

[cp-patches] RFC: HashMap/WeakHashMap key identity comparisons


From: Jeroen Frijters
Subject: [cp-patches] RFC: HashMap/WeakHashMap key identity comparisons
Date: Fri, 6 Jan 2006 16:17:44 +0100

address@hidden wrote:
> What, "we're lazy" isn't valid?  :-)

It's definitely valid!

> If you're interested there's also a PR about classes whose equals()
> method doesn't return true even when the objects are '=='.
> Apparently Sun's collections handle this.

Thanks. I've written the attached patch, it fixes 24618. Unless someone
complains, I'll check it in before 0.20.

Regards,
Jeroen

2006-01-06  Jeroen Frijters  <address@hidden>

        PR classpath/24618
        * java/util/AbstractMap.java
        (equals(Object,Object)): Test for identity first.
        * java/util/WeakHashMap.java
        (WeakBucket.WeakEntry.equals): Use helper method to determine
equality.
        (WeakBucket.WeakEntry.toString): Fixed string representation of
        null key.
        (internalGet): Use helper method to determine equality.

Attachment: HashMap.patch.txt
Description: HashMap.patch.txt


reply via email to

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