RFR (2nd round) 8009736: Comparator API cleanup (original) (raw)
Henry Jen henry.jen at oracle.com
Thu Jun 20 23:40:32 UTC 2013
- Previous message: RFR (2nd round) 8009736: Comparator API cleanup
- Next message: RFR (2nd round) 8009736: Comparator API cleanup
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 06/20/2013 03:45 PM, Michael Hixson wrote:
+ return new NullComparator(nullFirst, real == null ? null : real.thenComparing(other));
Should that be "other" instead of the second "null", like this? + return new NullComparator(nullFirst, real == null ? other : real.thenComparing(other)); Also, if Comparator.nullsFirst(null) and nullsLast(null) no longer throw, I think it's worth mentioning what their behavior is in the javadocs. My suggestion: "If the specified comparator is {@code null}, then the returned comparator considers all non-null values to be equal."
You are right on both, both fixed and added extra test. http://hg.openjdk.java.net/lambda/lambda/jdk/rev/197698000f78
webrev updated.
Cheers, Henry
- Previous message: RFR (2nd round) 8009736: Comparator API cleanup
- Next message: RFR (2nd round) 8009736: Comparator API cleanup
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]