-
Enhancement
-
Resolution: Fixed
-
P4
-
6
-
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.
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.
- relates to
-
JDK-4890211 (coll) Collections.ReverseOrder.equals method is lacking
- Resolved