(coll) Collections.reverseOrder(Comparator) should override equals, hashCode

XMLWordPrintable

    • b07
    • generic
    • generic
    • Not verified

      java.net member jmehrens writes:

        The fix to 4890211 in JDK 6 build 71 works great however, it only
        applies to Collections.reverseOrder() and not to
        Collections.reverseOrder(Comparator).

        What I feel was missed was that equal/hashcode methods should
        have been added to ReverseComparator2 because it is not
        stateless and is Serializable. So a similar issue can show up
        in the ReverseComparator2. Since both of these classes are a
        part of the reverseOrder API, it seems to me that the fix
        should have gone the extra step and applied changes to the
        ReverseComparator2 too.

            Assignee:
            Martin Buchholz
            Reporter:
            Tim Bell
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: