method refs: is exact should check super methods for this/super qualifiers only (IDEA-124507)

This commit is contained in:
Anna Kozlova
2014-04-28 12:57:27 +02:00
parent 9929113aed
commit 84deec968d
3 changed files with 27 additions and 1 deletions

View File

@@ -0,0 +1,21 @@
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.concurrent.Callable;
class Test {
private static void <warning descr="Private method 'foo(java.lang.Runnable)' is never used">foo</warning>(Runnable runnable) {
System.out.println(runnable);
}
private static void foo(Callable<Iterator<?>> callable) {
System.out.println(callable);
}
public static void main(String[] args) {
final Collection<Void> collection = new ArrayList<>();
final Iterable<Void> iterable = collection;
foo(iterable::iterator);
foo(collection::iterator);
}
}