Failed
org.eclipse.jdt.core.tests.compiler.regression.ProgrammingProblemsTest.testBug410218f - 10 (from org.eclipse.jdt.core.tests.compiler.regression.TestAll)
Error Message
testBug410218f - Eclipse found warning(s) but Javac did not find any. ----------- Expected ------------ ------------ but was ------------ ----------\n 1. WARNING in test\TestUnlikely.java (at line 30)\n c.remove(o); // warning: unrelated interface\n ^\n Unlikely argument type TestUnlikely.OtherInterface for remove(Object) on a Collection<TestUnlikely.Interface>\n ----------\n 2. WARNING in test\TestUnlikely.java (at line 37)\n c.remove(i); // warning: unrelated interface\n ^\n Unlikely argument type TestUnlikely.Interface for remove(Object) on a Collection<TestUnlikely.OtherInterface>\n ----------\n 3. WARNING in test\TestUnlikely.java (at line 39)\n c.remove(f); // warning: impossible\n ^\n Unlikely argument type TestUnlikely.Final for remove(Object) on a Collection<TestUnlikely.OtherInterface>\n ----------\n 4. WARNING in test\TestUnlikely.java (at line 40)\n c.remove(nf); // warning: castable, but not supertype\n ^^\n Unlikely argument type TestUnlikely.NonFinal for remove(Object) on a Collection<TestUnlikely.OtherInterface>\n ----------\n 5. WARNING in test\TestUnlikely.java (at line 46)\n c.remove(o); // warning: impossible\n ^\n Unlikely argument type TestUnlikely.OtherInterface for remove(Object) on a Collection<TestUnlikely.Final>\n ----------\n 6. WARNING in test\TestUnlikely.java (at line 48)\n c.remove(nf); // warning: impossible\n ^^\n Unlikely argument type TestUnlikely.NonFinal for remove(Object) on a Collection<TestUnlikely.Final>\n ----------\n 7. WARNING in test\TestUnlikely.java (at line 49)\n c.remove(s); // warning: impossible\n ^\n Unlikely argument type TestUnlikely.Sub for remove(Object) on a Collection<TestUnlikely.Final>\n ----------\n 8. WARNING in test\TestUnlikely.java (at line 54)\n c.remove(o); // warning: unrelated interface\n ^\n Unlikely argument type TestUnlikely.OtherInterface for remove(Object) on a Collection<TestUnlikely.NonFinal>\n ----------\n 9. WARNING in test\TestUnlikely.java (at line 55)\n c.remove(f); // warning: impossible\n ^\n Unlikely argument type TestUnlikely.Final for remove(Object) on a Collection<TestUnlikely.NonFinal>\n ----------\n 10. WARNING in test\TestUnlikely.java (at line 63)\n c.remove(f); // warning: impossible\n ^\n Unlikely argument type TestUnlikely.Final for remove(Object) on a Collection<TestUnlikely.Sub>\n ----------\n 11. WARNING in test\TestUnlikely.java (at line 70)\n map.containsKey(value); // warning\n ^^^^^\n Unlikely argument type V for containsKey(Object) on a Map<K,V>\n ----------\n 12. WARNING in test\TestUnlikely.java (at line 71)\n map.containsValue(key); // warning\n ^^^\n Unlikely argument type K for containsValue(Object) on a Map<K,V>\n ----------\n 13. WARNING in test\TestUnlikely.java (at line 95)\n if (c.contains(iterator.next())) { // warning\n ^^^^^^^^^^^^^^^\n Unlikely argument type U for contains(Object) on a Collection<T>\n ----------\n 14. WARNING in test\TestUnlikely.java (at line 105)\n c.removeAll(other); // warning\n ^^^^^\n Unlikely argument type Set<TestUnlikely.Final> for removeAll(Collection<?>) on a Collection<TestUnlikely.NonFinal>\n ----------\n 15. WARNING in test\TestUnlikely.java (at line 111)\n Predicate<OtherInterface> p2 = c::contains; // warning\n ^^^^^^^^^^^\n Unlikely argument type TestUnlikely.OtherInterface for contains(Object) on a Collection<TestUnlikely.Interface>\n ----------\n 16. WARNING in test\TestUnlikely.java (at line 112)\n BiPredicate<Collection<Interface>, OtherInterface> bp2 = Collection<Interface>::contains; // warning\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n Unlikely argument type TestUnlikely.OtherInterface for contains(Object) on a Collection<TestUnlikely.Interface>\n ----------\n 17. INFO in test\TestUnlikely.java (at line 120)\n s.equals(i); // info\n ^\n Unlikely argument type for equals(): Integer seems to be unrelated to String\n ----------\n 18. INFO in test\TestUnlikely.java (at line 121)\n i.equals(s); // info\n ^\n Unlikely argument type for equals(): String seems to be unrelated to Integer\n ----------\n 19. INFO in test\TestUnlikely.java (at line 125)\n Predicate<String> p1 = i::equals; // info\n ^^^^^^^^^\n Unlikely argument type for equals(): String seems to be unrelated to Integer\n ----------\n 20. INFO in test\TestUnlikely.java (at line 128)\n BiPredicate<String, Integer> bp2 = Object::equals; // info\n ^^^^^^^^^^^^^^\n Unlikely argument type for equals(): Integer seems to be unrelated to String\n ----------\n 21. INFO in test\TestUnlikely.java (at line 131)\n Objects.equals(s, i); // info\n ^\n Unlikely argument type for equals(): Integer seems to be unrelated to String\n ----------\n 22. INFO in test\TestUnlikely.java (at line 132)\n Objects.equals(i, s); // info\n ^\n Unlikely argument type for equals(): String seems to be unrelated to Integer\n ----------\n 23. INFO in test\TestUnlikely.java (at line 136)\n BiPredicate<String, Integer> bp3 = Objects::equals; // info\n ^^^^^^^^^^^^^^^\n Unlikely argument type for equals(): Integer seems to be unrelated to String\n ----------\n --------- Difference is ---------- expected:<[]> but was:<[----------\n 1. WARNING in test\TestUnlikely.java (at line 30)\n c.remove(o); // warning: unrelated interface\n ^\n Unlikely argument type TestUnlikely.OtherInterface for remove(Object) on a Collection<TestUnlikely.Interface>\n ----------\n 2. WARNING in test\TestUnlikely.java (at line 37)\n c.remove(i); // warning: unrelated interface\n ^\n Unlikely argument type TestUnlikely.Interface for remove(Object) on a Collection<TestUnlikely.OtherInterface>\n ----------\n 3. WARNING in test\TestUnlikely.java (at line 39)\n c.remove(f); // warning: impossible\n ^\n Unlikely argument type TestUnlikely.Final for remove(Object) on a Collection<TestUnlikely.OtherInterface>\n ----------\n 4. WARNING in test\TestUnlikely.java (at line 40)\n c.remove(nf); // warning: castable, but not supertype\n ^^\n Unlikely argument type TestUnlikely.NonFinal for remove(Object) on a Collection<TestUnlikely.OtherInterface>\n ----------\n 5. WARNING in test\TestUnlikely.java (at line 46)\n c.remove(o); // warning: impossible\n ^\n Unlikely argument type TestUnlikely.OtherInterface for remove(Object) on a Collection<TestUnlikely.Final>\n ----------\n 6. WARNING in test\TestUnlikely.java (at line 48)\n c.remove(nf); // warning: impossible\n ^^\n Unlikely argument type TestUnlikely.NonFinal for remove(Object) on a Collection<TestUnlikely.Final>\n ----------\n 7. WARNING in test\TestUnlikely.java (at line 49)\n c.remove(s); // warning: impossible\n ^\n Unlikely argument type TestUnlikely.Sub for remove(Object) on a Collection<TestUnlikely.Final>\n ----------\n 8. WARNING in test\TestUnlikely.java (at line 54)\n c.remove(o); // warning: unrelated interface\n ^\n Unlikely argument type TestUnlikely.OtherInterface for remove(Object) on a Collection<TestUnlikely.NonFinal>\n ----------\n 9. WARNING in test\TestUnlikely.java (at line 55)\n c.remove(f); // warning: impossible\n ^\n Unlikely argument type TestUnlikely.Final for remove(Object) on a Collection<TestUnlikely.NonFinal>\n ----------\n 10. WARNING in test\TestUnlikely.java (at line 63)\n c.remove(f); // warning: impossible\n ^\n Unlikely argument type TestUnlikely.Final for remove(Object) on a Collection<TestUnlikely.Sub>\n ----------\n 11. WARNING in test\TestUnlikely.java (at line 70)\n map.containsKey(value); // warning\n ^^^^^\n Unlikely argument type V for containsKey(Object) on a Map<K,V>\n ----------\n 12. WARNING in test\TestUnlikely.java (at line 71)\n map.containsValue(key); // warning\n ^^^\n Unlikely argument type K for containsValue(Object) on a Map<K,V>\n ----------\n 13. WARNING in test\TestUnlikely.java (at line 95)\n if (c.contains(iterator.next())) { // warning\n ^^^^^^^^^^^^^^^\n Unlikely argument type U for contains(Object) on a Collection<T>\n ----------\n 14. WARNING in test\TestUnlikely.java (at line 105)\n c.removeAll(other); // warning\n ^^^^^\n Unlikely argument type Set<TestUnlikely.Final> for removeAll(Collection<?>) on a Collection<TestUnlikely.NonFinal>\n ----------\n 15. WARNING in test\TestUnlikely.java (at line 111)\n Predicate<OtherInterface> p2 = c::contains; // warning\n ^^^^^^^^^^^\n Unlikely argument type TestUnlikely.OtherInterface for contains(Object) on a Collection<TestUnlikely.Interface>\n ----------\n 16. WARNING in test\TestUnlikely.java (at line 112)\n BiPredicate<Collection<Interface>, OtherInterface> bp2 = Collection<Interface>::contains; // warning\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n Unlikely argument type TestUnlikely.OtherInterface for contains(Object) on a Collection<TestUnlikely.Interface>\n ----------\n 17. INFO in test\TestUnlikely.java (at line 120)\n s.equals(i); // info\n ^\n Unlikely argument type for equals(): Integer seems to be unrelated to String\n ----------\n 18. INFO in test\TestUnlikely.java (at line 121)\n i.equals(s); // info\n ^\n Unlikely argument type for equals(): String seems to be unrelated to Integer\n ----------\n 19. INFO in test\TestUnlikely.java (at line 125)\n Predicate<String> p1 = i::equals; // info\n ^^^^^^^^^\n Unlikely argument type for equals(): String seems to be unrelated to Integer\n ----------\n 20. INFO in test\TestUnlikely.java (at line 128)\n BiPredicate<String, Integer> bp2 = Object::equals; // info\n ^^^^^^^^^^^^^^\n Unlikely argument type for equals(): Integer seems to be unrelated to String\n ----------\n 21. INFO in test\TestUnlikely.java (at line 131)\n Objects.equals(s, i); // info\n ^\n Unlikely argument type for equals(): Integer seems to be unrelated to String\n ----------\n 22. INFO in test\TestUnlikely.java (at line 132)\n Objects.equals(i, s); // info\n ^\n Unlikely argument type for equals(): String seems to be unrelated to Integer\n ----------\n 23. INFO in test\TestUnlikely.java (at line 136)\n BiPredicate<String, Integer> bp3 = Objects::equals; // info\n ^^^^^^^^^^^^^^^\n Unlikely argument type for equals(): Integer seems to be unrelated to String\n ----------\n ]>
Stacktrace
junit.framework.ComparisonFailure: testBug410218f - Eclipse found warning(s) but Javac did not find any. ----------- Expected ------------ ------------ but was ------------ ----------\n 1. WARNING in test\TestUnlikely.java (at line 30)\n c.remove(o); // warning: unrelated interface\n ^\n Unlikely argument type TestUnlikely.OtherInterface for remove(Object) on a Collection<TestUnlikely.Interface>\n ----------\n 2. WARNING in test\TestUnlikely.java (at line 37)\n c.remove(i); // warning: unrelated interface\n ^\n Unlikely argument type TestUnlikely.Interface for remove(Object) on a Collection<TestUnlikely.OtherInterface>\n ----------\n 3. WARNING in test\TestUnlikely.java (at line 39)\n c.remove(f); // warning: impossible\n ^\n Unlikely argument type TestUnlikely.Final for remove(Object) on a Collection<TestUnlikely.OtherInterface>\n ----------\n 4. WARNING in test\TestUnlikely.java (at line 40)\n c.remove(nf); // warning: castable, but not supertype\n ^^\n Unlikely argument type TestUnlikely.NonFinal for remove(Object) on a Collection<TestUnlikely.OtherInterface>\n ----------\n 5. WARNING in test\TestUnlikely.java (at line 46)\n c.remove(o); // warning: impossible\n ^\n Unlikely argument type TestUnlikely.OtherInterface for remove(Object) on a Collection<TestUnlikely.Final>\n ----------\n 6. WARNING in test\TestUnlikely.java (at line 48)\n c.remove(nf); // warning: impossible\n ^^\n Unlikely argument type TestUnlikely.NonFinal for remove(Object) on a Collection<TestUnlikely.Final>\n ----------\n 7. WARNING in test\TestUnlikely.java (at line 49)\n c.remove(s); // warning: impossible\n ^\n Unlikely argument type TestUnlikely.Sub for remove(Object) on a Collection<TestUnlikely.Final>\n ----------\n 8. WARNING in test\TestUnlikely.java (at line 54)\n c.remove(o); // warning: unrelated interface\n ^\n Unlikely argument type TestUnlikely.OtherInterface for remove(Object) on a Collection<TestUnlikely.NonFinal>\n ----------\n 9. WARNING in test\TestUnlikely.java (at line 55)\n c.remove(f); // warning: impossible\n ^\n Unlikely argument type TestUnlikely.Final for remove(Object) on a Collection<TestUnlikely.NonFinal>\n ----------\n 10. WARNING in test\TestUnlikely.java (at line 63)\n c.remove(f); // warning: impossible\n ^\n Unlikely argument type TestUnlikely.Final for remove(Object) on a Collection<TestUnlikely.Sub>\n ----------\n 11. WARNING in test\TestUnlikely.java (at line 70)\n map.containsKey(value); // warning\n ^^^^^\n Unlikely argument type V for containsKey(Object) on a Map<K,V>\n ----------\n 12. WARNING in test\TestUnlikely.java (at line 71)\n map.containsValue(key); // warning\n ^^^\n Unlikely argument type K for containsValue(Object) on a Map<K,V>\n ----------\n 13. WARNING in test\TestUnlikely.java (at line 95)\n if (c.contains(iterator.next())) { // warning\n ^^^^^^^^^^^^^^^\n Unlikely argument type U for contains(Object) on a Collection<T>\n ----------\n 14. WARNING in test\TestUnlikely.java (at line 105)\n c.removeAll(other); // warning\n ^^^^^\n Unlikely argument type Set<TestUnlikely.Final> for removeAll(Collection<?>) on a Collection<TestUnlikely.NonFinal>\n ----------\n 15. WARNING in test\TestUnlikely.java (at line 111)\n Predicate<OtherInterface> p2 = c::contains; // warning\n ^^^^^^^^^^^\n Unlikely argument type TestUnlikely.OtherInterface for contains(Object) on a Collection<TestUnlikely.Interface>\n ----------\n 16. WARNING in test\TestUnlikely.java (at line 112)\n BiPredicate<Collection<Interface>, OtherInterface> bp2 = Collection<Interface>::contains; // warning\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n Unlikely argument type TestUnlikely.OtherInterface for contains(Object) on a Collection<TestUnlikely.Interface>\n ----------\n 17. INFO in test\TestUnlikely.java (at line 120)\n s.equals(i); // info\n ^\n Unlikely argument type for equals(): Integer seems to be unrelated to String\n ----------\n 18. INFO in test\TestUnlikely.java (at line 121)\n i.equals(s); // info\n ^\n Unlikely argument type for equals(): String seems to be unrelated to Integer\n ----------\n 19. INFO in test\TestUnlikely.java (at line 125)\n Predicate<String> p1 = i::equals; // info\n ^^^^^^^^^\n Unlikely argument type for equals(): String seems to be unrelated to Integer\n ----------\n 20. INFO in test\TestUnlikely.java (at line 128)\n BiPredicate<String, Integer> bp2 = Object::equals; // info\n ^^^^^^^^^^^^^^\n Unlikely argument type for equals(): Integer seems to be unrelated to String\n ----------\n 21. INFO in test\TestUnlikely.java (at line 131)\n Objects.equals(s, i); // info\n ^\n Unlikely argument type for equals(): Integer seems to be unrelated to String\n ----------\n 22. INFO in test\TestUnlikely.java (at line 132)\n Objects.equals(i, s); // info\n ^\n Unlikely argument type for equals(): String seems to be unrelated to Integer\n ----------\n 23. INFO in test\TestUnlikely.java (at line 136)\n BiPredicate<String, Integer> bp3 = Objects::equals; // info\n ^^^^^^^^^^^^^^^\n Unlikely argument type for equals(): Integer seems to be unrelated to String\n ----------\n --------- Difference is ---------- expected:<[]> but was:<[----------\n 1. WARNING in test\TestUnlikely.java (at line 30)\n c.remove(o); // warning: unrelated interface\n ^\n Unlikely argument type TestUnlikely.OtherInterface for remove(Object) on a Collection<TestUnlikely.Interface>\n ----------\n 2. WARNING in test\TestUnlikely.java (at line 37)\n c.remove(i); // warning: unrelated interface\n ^\n Unlikely argument type TestUnlikely.Interface for remove(Object) on a Collection<TestUnlikely.OtherInterface>\n ----------\n 3. WARNING in test\TestUnlikely.java (at line 39)\n c.remove(f); // warning: impossible\n ^\n Unlikely argument type TestUnlikely.Final for remove(Object) on a Collection<TestUnlikely.OtherInterface>\n ----------\n 4. WARNING in test\TestUnlikely.java (at line 40)\n c.remove(nf); // warning: castable, but not supertype\n ^^\n Unlikely argument type TestUnlikely.NonFinal for remove(Object) on a Collection<TestUnlikely.OtherInterface>\n ----------\n 5. WARNING in test\TestUnlikely.java (at line 46)\n c.remove(o); // warning: impossible\n ^\n Unlikely argument type TestUnlikely.OtherInterface for remove(Object) on a Collection<TestUnlikely.Final>\n ----------\n 6. WARNING in test\TestUnlikely.java (at line 48)\n c.remove(nf); // warning: impossible\n ^^\n Unlikely argument type TestUnlikely.NonFinal for remove(Object) on a Collection<TestUnlikely.Final>\n ----------\n 7. WARNING in test\TestUnlikely.java (at line 49)\n c.remove(s); // warning: impossible\n ^\n Unlikely argument type TestUnlikely.Sub for remove(Object) on a Collection<TestUnlikely.Final>\n ----------\n 8. WARNING in test\TestUnlikely.java (at line 54)\n c.remove(o); // warning: unrelated interface\n ^\n Unlikely argument type TestUnlikely.OtherInterface for remove(Object) on a Collection<TestUnlikely.NonFinal>\n ----------\n 9. WARNING in test\TestUnlikely.java (at line 55)\n c.remove(f); // warning: impossible\n ^\n Unlikely argument type TestUnlikely.Final for remove(Object) on a Collection<TestUnlikely.NonFinal>\n ----------\n 10. WARNING in test\TestUnlikely.java (at line 63)\n c.remove(f); // warning: impossible\n ^\n Unlikely argument type TestUnlikely.Final for remove(Object) on a Collection<TestUnlikely.Sub>\n ----------\n 11. WARNING in test\TestUnlikely.java (at line 70)\n map.containsKey(value); // warning\n ^^^^^\n Unlikely argument type V for containsKey(Object) on a Map<K,V>\n ----------\n 12. WARNING in test\TestUnlikely.java (at line 71)\n map.containsValue(key); // warning\n ^^^\n Unlikely argument type K for containsValue(Object) on a Map<K,V>\n ----------\n 13. WARNING in test\TestUnlikely.java (at line 95)\n if (c.contains(iterator.next())) { // warning\n ^^^^^^^^^^^^^^^\n Unlikely argument type U for contains(Object) on a Collection<T>\n ----------\n 14. WARNING in test\TestUnlikely.java (at line 105)\n c.removeAll(other); // warning\n ^^^^^\n Unlikely argument type Set<TestUnlikely.Final> for removeAll(Collection<?>) on a Collection<TestUnlikely.NonFinal>\n ----------\n 15. WARNING in test\TestUnlikely.java (at line 111)\n Predicate<OtherInterface> p2 = c::contains; // warning\n ^^^^^^^^^^^\n Unlikely argument type TestUnlikely.OtherInterface for contains(Object) on a Collection<TestUnlikely.Interface>\n ----------\n 16. WARNING in test\TestUnlikely.java (at line 112)\n BiPredicate<Collection<Interface>, OtherInterface> bp2 = Collection<Interface>::contains; // warning\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n Unlikely argument type TestUnlikely.OtherInterface for contains(Object) on a Collection<TestUnlikely.Interface>\n ----------\n 17. INFO in test\TestUnlikely.java (at line 120)\n s.equals(i); // info\n ^\n Unlikely argument type for equals(): Integer seems to be unrelated to String\n ----------\n 18. INFO in test\TestUnlikely.java (at line 121)\n i.equals(s); // info\n ^\n Unlikely argument type for equals(): String seems to be unrelated to Integer\n ----------\n 19. INFO in test\TestUnlikely.java (at line 125)\n Predicate<String> p1 = i::equals; // info\n ^^^^^^^^^\n Unlikely argument type for equals(): String seems to be unrelated to Integer\n ----------\n 20. INFO in test\TestUnlikely.java (at line 128)\n BiPredicate<String, Integer> bp2 = Object::equals; // info\n ^^^^^^^^^^^^^^\n Unlikely argument type for equals(): Integer seems to be unrelated to String\n ----------\n 21. INFO in test\TestUnlikely.java (at line 131)\n Objects.equals(s, i); // info\n ^\n Unlikely argument type for equals(): Integer seems to be unrelated to String\n ----------\n 22. INFO in test\TestUnlikely.java (at line 132)\n Objects.equals(i, s); // info\n ^\n Unlikely argument type for equals(): String seems to be unrelated to Integer\n ----------\n 23. INFO in test\TestUnlikely.java (at line 136)\n BiPredicate<String, Integer> bp3 = Objects::equals; // info\n ^^^^^^^^^^^^^^^\n Unlikely argument type for equals(): Integer seems to be unrelated to String\n ----------\n ]> at org.eclipse.jdt.core.tests.compiler.regression.ProgrammingProblemsTest.testBug410218f(ProgrammingProblemsTest.java:2961)
Standard Output
org.eclipse.jdt.core.tests.compiler.regression.ProgrammingProblemsTest#testBug410218f - 10 test/TestUnlikely.java [ package test; import java.util.Collection; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Objects; import java.util.Set; import java.util.function.BiPredicate; import java.util.function.Predicate; public class TestUnlikely { interface Interface { } interface OtherInterface { } static class NonFinal implements Interface { } static class Sub extends NonFinal implements OtherInterface { } static final class Final implements Interface { } void f1(List<Interface> c, Interface i, OtherInterface o, Final f, NonFinal nf, Sub s) { c.remove(i); c.remove(o); // warning: unrelated interface c.remove(f); c.remove(nf); c.remove(s); } void f2(List<OtherInterface> c, Interface i, OtherInterface o, Final f, NonFinal nf, Sub s) { c.remove(i); // warning: unrelated interface c.remove(o); c.remove(f); // warning: impossible c.remove(nf); // warning: castable, but not supertype c.remove(s); } void f3(List<Final> c, Interface i, OtherInterface o, Final f, NonFinal nf, Sub s) { c.remove(i); // supertype c.remove(o); // warning: impossible c.remove(f); c.remove(nf); // warning: impossible c.remove(s); // warning: impossible } void f4(List<NonFinal> c, Interface i, OtherInterface o, Final f, NonFinal nf, Sub s) { c.remove(i); // supertype c.remove(o); // warning: unrelated interface c.remove(f); // warning: impossible c.remove(nf); c.remove(s); } void f5(List<Sub> c, Interface i, OtherInterface o, Final f, NonFinal nf, Sub s) { c.remove(i); // supertype c.remove(o); // supertype c.remove(f); // warning: impossible c.remove(nf); // supertype c.remove(s); } <K, V> void map(Map<K, V> map, K key, V value) { map.containsKey(key); map.containsKey(value); // warning map.containsValue(key); // warning map.containsValue(value); } boolean wildcards(Collection<?> c, Iterable<?> s) { for (Iterator<?> iterator = s.iterator(); iterator.hasNext();) { if (c.contains(iterator.next())) { return true; } } return false; } <T, U extends T> boolean relatedTypeVariables(Collection<T> c, Iterable<U> s) { for (Iterator<?> iterator = s.iterator(); iterator.hasNext();) { if (c.contains(iterator.next())) { return true; } } return false; } <T, U> boolean unrelatedTypeVariables(Collection<T> c, Iterable<U> s) { for (Iterator<U> iterator = s.iterator(); iterator.hasNext();) { if (c.contains(iterator.next())) { // warning return true; } } return false; } void all(List<NonFinal> c, Collection<Sub> s, Set<Final> other) { c.removeAll(s); s.removeAll(c); c.removeAll(other); // warning } void methodRef(Set<Interface> c, Interface i, OtherInterface o, Final f, NonFinal nf, Sub s) { Predicate<Interface> p1 = c::contains; BiPredicate<Collection<Interface>, Interface> bp1 = Collection<Interface>::contains; Predicate<OtherInterface> p2 = c::contains; // warning BiPredicate<Collection<Interface>, OtherInterface> bp2 = Collection<Interface>::contains; // warning p1.test(i); bp1.test(c, i); p2.test(o); bp2.test(c, o); } void equals(String s, Integer i, Number n) { s.equals(i); // info i.equals(s); // info i.equals(n); n.equals(i); Predicate<String> p1 = i::equals; // info p1.test(s); BiPredicate<String, Integer> bp2 = Object::equals; // info bp2.test(s, i); Objects.equals(s, i); // info Objects.equals(i, s); // info Objects.equals(n, i); Objects.equals(i, n); BiPredicate<String, Integer> bp3 = Objects::equals; // info bp3.test(s, i); } } ] Full results sent to /tmp/comptest/run.1584245034298/10.0.2_20200315_040443.txt
Standard Error
----------------------------------------