hg: lambda/lambda/jdk: 8009736: Comparator to allow narrowing type on combinator APIs
Henry Jen
henry.jen at oracle.com
Mon Mar 11 11:02:36 PDT 2013
On Mar 11, 2013, at 10:33 AM, Dan Smith <daniel.smith at oracle.com> wrote:
> To be consistent, Comparators.reverseOrder should be changed to match (thus avoiding an unchecked cast). Don't know what our compatibility policies are for existing generic methods, though…
>
I would like to do that, but I am not sure if it's an acceptable change if we make it in Collections.reverseOrder().
Another possibility is to have a separate implementation in the new API?
Cheers,
Henry
> —Dan
>
> On Mar 9, 2013, at 11:27 PM, henry.jen at oracle.com wrote:
>
>> Changeset: fb7b7275d220
>> Author: henryjen
>> Date: 2013-03-08 21:54 -0800
>> URL: http://hg.openjdk.java.net/lambda/lambda/jdk/rev/fb7b7275d220
>>
>> 8009736: Comparator to allow narrowing type on combinator APIs
>> Reviewed-by:
>> Summary: Allow to narrow return type, add javadoc return tag
>> Allow key extract not limited to Comparable, but use a Comparator of key type.
>>
>> ! src/share/classes/java/util/Comparator.java
>> ! src/share/classes/java/util/Comparators.java
>>
>>
>
More information about the lambda-dev
mailing list