public static void foo(List<? extends Foo> foos) { final Comparator<Foo> comparator = createComparator(); Collections.sort(foos, comparator); } private static Comparator<Foo> createComparator() { return ...; } public interface Foo { }
IDEA 4188 highlights the method call Collections.sort() in red, where as the compiler does not show an error. Who is right?