[10] RFR 8171826 Comparator.reverseOrder(c) mishandles singleton comparators

Paul Sandoz paul.sandoz at oracle.com
Mon Dec 11 18:58:40 UTC 2017


Hi,

Please review this simple fix.

http://cr.openjdk.java.net/~psandoz/jdk10/JDK-8171826-comparator-equality/webrev/

The method Comparator<T> reverseOrder(Comparator<T> cmp) is updated to be a little smarter returning constant comparators for natural and reverse-natural.

Paul.


More information about the core-libs-dev mailing list