You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Michael Smith <mi...@iammichael.org> on 2002/02/10 06:53:45 UTC

[collections][PATCH] DefaultMapEntry: license update, hashCode/equals fixes

Changes to src/java/org/apache/commons/collections/DefaultMapEntry.java:

 - Changed license to proper long form

 - Reimplemented hashCode and equals to conform to the Map.Entry API
spec:
    -  equals caused NPE on null instead of returning false
    -  equals only worked against DefaultMapEntry implementations and
not
       other Map.Entry implementations
    -  hashcode of a null key and null object should be 0, not 123456789

 - Improved implementation of hashCode and equals to minimize work
required
   to compute the result


Regards,
michael