JDK-8223933: Clarify specification of Stream.distinct()
Backport of Java 8/9 java.util.stream API to Java 6/7 and Android
Brought to you by:
stefan-zobel
"Stream.distinct() sometimes allows duplicates when the stream is sorted"
https://bugs.openjdk.java.net/browse/JDK-8223933
The specification for distinct() should specify that if the input stream is sorted, the comparison method used for sorting must be consistent with equals.
Anonymous