[jboss-jira] [JBoss JIRA] Updated: (JBCACHE-765) implementation of equals() in collections is incorrect

Nitzan Niv (JIRA) jira-events at jboss.com
Wed Sep 13 04:51:43 EDT 2006


     [ http://jira.jboss.com/jira/browse/JBCACHE-765?page=all ]

Nitzan Niv updated JBCACHE-765:
-------------------------------

    Attachment: CachedMapImpl.java
                CachedListAbstract.java

I'm attaching updated versions of the files that also handle correctly comparison to null.

> implementation of equals() in collections is incorrect
> ------------------------------------------------------
>
>                 Key: JBCACHE-765
>                 URL: http://jira.jboss.com/jira/browse/JBCACHE-765
>             Project: JBoss Cache
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: PojoCache
>            Reporter: Nitzan Niv
>         Assigned To: Ben Wang
>             Fix For: 2.0.0
>
>         Attachments: CachedListAbstract.java, CachedListAbstract.java, CachedMapImpl.java, CachedMapImpl.java
>
>
> The implementation of equals() is in PojoCache collections (List, Map) is incorrect (inconsistent with the List and Map interfaces behavior):
> In Map, equals() returns true for two maps that have the same keys but different mapping (e.g., map1 = ["ID", "1"], map2 = "ID", "2"]).
> In List, equals() returns true for two lists that have the same elements but in a different order (e.g., list1 = [1][2], list2 = [2][1]).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list