Comparators.comparing overloads

Brian Goetz brian.goetz at
Sun Jul 21 13:02:15 PDT 2013

We only mangle the name for return types, not argument types.  

Sent from my iPad

On Jul 21, 2013, at 2:34 PM, Richard Warburton <richard.warburton at> wrote:

> Hi,
> In many places in the Streams API the methods utilising primitive
> specialised functions have been renamed in order to avoid overload
> resolution issues, eg mapToInt etc.  This doesn't appear to have happened
> to the Comparator.comparing static method, or the thenComparing default
> methods on Comparator instances.  Is there a reason for this, or is it just
> a case of not having had time to effect such a change?
> Here is the most trivial example which results in overload resolution
> issues:
> Comparators.comparing(x -> 0);
> regards,
>  Dr. Richard Warburton
>  @RichardWarburto <>

More information about the lambda-dev mailing list