mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-27 17:49:19 +07:00
- update language levels partially - fix tests GitOrigin-RevId: 8d7b599772eda8dfd999bee9f816ec2609be4adb
22 lines
606 B
Java
22 lines
606 B
Java
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() {
|
|
final Collection<Void> collection = new ArrayList<>();
|
|
final Iterable<Void> iterable = collection;
|
|
foo(iterable::iterator);
|
|
foo(collection::iterator);
|
|
}
|
|
}
|