Generics problem or my misunderstanding
We have following code (simplified example):
public static void foo(List foos) {
final Comparator comparator = createComparator();
Collections.sort(foos, comparator);
}
private static Comparator]]> 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?
Tom
请先登录再写评论。
I hate to say it but this is IDEA bug.
Thanks Eugene, I wasn't sure whether it's a IDEA or compiler bug or my own misunderstanding. I've added a JIRA issue.