Comparators.reverseOrder issues
Georgiy Rakov
georgiy.rakov at oracle.com
Mon Oct 29 08:15:55 PDT 2012
Rémi, thanks a lot for your answer,
my short comment is below.
Georgiy.
On 29.10.2012 18:08, Remi Forax wrote:
> On 10/29/2012 12:10 PM, Paul Sandoz wrote:
>> Hi Georgiy,
>>
>> Brian fixed 1) recently:
>>
>> http://hg.openjdk.java.net/lambda/lambda/jdk/rev/f6366de3394c
>>
>> Although arguably that could break compatibility with existing source and implementations that somehow worked around the CCE.
>>
>> For 2) i am not sure what can be done, i think we are stuck with it.
> For 2), I think reverseOrder(null) should throw a NPE, if the comparator
> is null.
Yes, the only counterargument I could see is the requirement of
Collections-like behavior.
>
> Note that now that we have default method, reverseOrder() should not be
> declared in Comparators
> but should be a default method of Comparator.
>
> Moreover when the compiler will accept to declare static methods in
> interface,
> (I've not tested if it is already Ok) the classes Comparators,
> Predicates etc. should be removed
> and all the implementations should be moved in the corresponding interfaces.
>
>> Paul.
> Rémi
>
>> On Oct 29, 2012, at 11:31 AM, Georgiy Rakov<georgiy.rakov at oracle.com> wrote:
>>
>>> Hello colleagues,
>>> could you please give your thoughts and comments. Do you consider it
>>> worth taking into account?
>>>
>>> Thanks, Georgiy.
>
More information about the lambda-dev
mailing list