Failed

org.eclipse.jdt.core.tests.compiler.regression.GenericsRegressionTest.test443596 - 10 (from org.eclipse.jdt.core.tests.compiler.regression.TestAll)

Failing for the past 11 builds (Since Failed#81 )
Took 0.92 sec.

Error Message

test443596 - Javac found error(s) but Eclipse only found warning(s).
----------- Expected ------------
----------\n
1. WARNING in X.java (at line 4)\n
 public static <T> Predicate<T> and(Predicate<? super T>... arg) { return null; }\n
                                                            ^^^\n
Type safety: Potential heap pollution via varargs parameter arg\n
----------\n

------------ but was ------------
X.java:4: warning: [unchecked] Possible heap pollution from parameterized vararg type Predicate<? super T>\n
    public static <T> Predicate<T> and(Predicate<? super T>... arg) { return null; }\n
                                                               ^\n
  where T is a type-variable:\n
    T extends Object declared in method <T>and(Predicate<? super T>...)\n
X.java:8: error: no suitable method found for and(Predicate<CAP#1>,Predicate<CAP#2>)\n
        public void error(Predicate<?> arg) { and(predicate, in(arg)); } // no compile\n
                                              ^\n
    method X.<T#1>and(Predicate<? super T#1>...) is not applicable\n
      (inference variable T#1 has incompatible upper bounds CAP#3,CAP#1,Object)\n
    method X.<T#2>and(Predicate<? super T#2>,Predicate<? super T#2>) is not applicable\n
      (inference variable T#2 has incompatible upper bounds CAP#3,CAP#1,Object)\n
  where E,T#1,T#2 are type-variables:\n
    E extends Object declared in class FilteredCollection\n
    T#1 extends Object declared in method <T#1>and(Predicate<? super T#1>...)\n
    T#2 extends Object declared in method <T#2>and(Predicate<? super T#2>,Predicate<? super T#2>)\n
  where CAP#1,CAP#2,CAP#3 are fresh type-variables:\n
    CAP#1 extends Object super: E from capture of ? super E\n
    CAP#2 extends Object from capture of ?\n
    CAP#3 extends Object from capture of ?\n
1 error\n
1 warning\n

--------- Difference is ----------
 expected:<[----------\n
1. WARNING in X.java (at line 4)\n
 public static <T> Predicate<T> and(Predicate<? super T>... arg) { return null; }\n
                                                            ^^^\n
Type safety: Potential heap pollution via varargs parameter arg\n
----------]\n
> but was:<[X.java:4: warning: [unchecked] Possible heap pollution from parameterized vararg type Predicate<? super T>\n
    public static <T> Predicate<T> and(Predicate<? super T>... arg) { return null; }\n
                                                               ^\n
  where T is a type-variable:\n
    T extends Object declared in method <T>and(Predicate<? super T>...)\n
X.java:8: error: no suitable method found for and(Predicate<CAP#1>,Predicate<CAP#2>)\n
        public void error(Predicate<?> arg) { and(predicate, in(arg)); } // no compile\n
                                              ^\n
    method X.<T#1>and(Predicate<? super T#1>...) is not applicable\n
      (inference variable T#1 has incompatible upper bounds CAP#3,CAP#1,Object)\n
    method X.<T#2>and(Predicate<? super T#2>,Predicate<? super T#2>) is not applicable\n
      (inference variable T#2 has incompatible upper bounds CAP#3,CAP#1,Object)\n
  where E,T#1,T#2 are type-variables:\n
    E extends Object declared in class FilteredCollection\n
    T#1 extends Object declared in method <T#1>and(Predicate<? super T#1>...)\n
    T#2 extends Object declared in method <T#2>and(Predicate<? super T#2>,Predicate<? super T#2>)\n
  where CAP#1,CAP#2,CAP#3 are fresh type-variables:\n
    CAP#1 extends Object super: E from capture of ? super E\n
    CAP#2 extends Object from capture of ?\n
    CAP#3 extends Object from capture of ?\n
1 error\n
1 warning]\n
>

Stacktrace

junit.framework.ComparisonFailure: 
test443596 - Javac found error(s) but Eclipse only found warning(s).
----------- Expected ------------
----------\n
1. WARNING in X.java (at line 4)\n
	public static <T> Predicate<T> and(Predicate<? super T>... arg) { return null; }\n
	                                                           ^^^\n
Type safety: Potential heap pollution via varargs parameter arg\n
----------\n

------------ but was ------------
X.java:4: warning: [unchecked] Possible heap pollution from parameterized vararg type Predicate<? super T>\n
    public static <T> Predicate<T> and(Predicate<? super T>... arg) { return null; }\n
                                                               ^\n
  where T is a type-variable:\n
    T extends Object declared in method <T>and(Predicate<? super T>...)\n
X.java:8: error: no suitable method found for and(Predicate<CAP#1>,Predicate<CAP#2>)\n
        public void error(Predicate<?> arg) { and(predicate, in(arg)); } // no compile\n
                                              ^\n
    method X.<T#1>and(Predicate<? super T#1>...) is not applicable\n
      (inference variable T#1 has incompatible upper bounds CAP#3,CAP#1,Object)\n
    method X.<T#2>and(Predicate<? super T#2>,Predicate<? super T#2>) is not applicable\n
      (inference variable T#2 has incompatible upper bounds CAP#3,CAP#1,Object)\n
  where E,T#1,T#2 are type-variables:\n
    E extends Object declared in class FilteredCollection\n
    T#1 extends Object declared in method <T#1>and(Predicate<? super T#1>...)\n
    T#2 extends Object declared in method <T#2>and(Predicate<? super T#2>,Predicate<? super T#2>)\n
  where CAP#1,CAP#2,CAP#3 are fresh type-variables:\n
    CAP#1 extends Object super: E from capture of ? super E\n
    CAP#2 extends Object from capture of ?\n
    CAP#3 extends Object from capture of ?\n
1 error\n
1 warning\n

--------- Difference is ----------
 expected:<[----------\n
1. WARNING in X.java (at line 4)\n
	public static <T> Predicate<T> and(Predicate<? super T>... arg) { return null; }\n
	                                                           ^^^\n
Type safety: Potential heap pollution via varargs parameter arg\n
----------]\n
> but was:<[X.java:4: warning: [unchecked] Possible heap pollution from parameterized vararg type Predicate<? super T>\n
    public static <T> Predicate<T> and(Predicate<? super T>... arg) { return null; }\n
                                                               ^\n
  where T is a type-variable:\n
    T extends Object declared in method <T>and(Predicate<? super T>...)\n
X.java:8: error: no suitable method found for and(Predicate<CAP#1>,Predicate<CAP#2>)\n
        public void error(Predicate<?> arg) { and(predicate, in(arg)); } // no compile\n
                                              ^\n
    method X.<T#1>and(Predicate<? super T#1>...) is not applicable\n
      (inference variable T#1 has incompatible upper bounds CAP#3,CAP#1,Object)\n
    method X.<T#2>and(Predicate<? super T#2>,Predicate<? super T#2>) is not applicable\n
      (inference variable T#2 has incompatible upper bounds CAP#3,CAP#1,Object)\n
  where E,T#1,T#2 are type-variables:\n
    E extends Object declared in class FilteredCollection\n
    T#1 extends Object declared in method <T#1>and(Predicate<? super T#1>...)\n
    T#2 extends Object declared in method <T#2>and(Predicate<? super T#2>,Predicate<? super T#2>)\n
  where CAP#1,CAP#2,CAP#3 are fresh type-variables:\n
    CAP#1 extends Object super: E from capture of ? super E\n
    CAP#2 extends Object from capture of ?\n
    CAP#3 extends Object from capture of ?\n
1 error\n
1 warning]\n
>
	at org.eclipse.jdt.core.tests.compiler.regression.GenericsRegressionTest.test443596(GenericsRegressionTest.java:5186)

Standard Output

org.eclipse.jdt.core.tests.compiler.regression.GenericsRegressionTest#test443596 - 10
X.java [
public final class X {
    static interface Predicate<T> { boolean test(T object); }
    public static <T> Predicate<T> in(Predicate<? extends T> arg) { return null; }
    public static <T> Predicate<T> and(Predicate<? super T>... arg) { return null; }
    public static <T> Predicate<T> and(Predicate<? super T> arg0, Predicate<? super T> arg1) { return null; }
    static class FilteredCollection<E> {
        Predicate<? super E> predicate;
        public void error(Predicate<?> arg) { and(predicate, in(arg)); } // no compile
    }
}

]


Full results sent to /tmp/genie.jdt/comptest/run.1563077023750/10.0.1_20190714_000352.txt

Standard Error

--- javac err: ---
X.java:4: warning: [unchecked] Possible heap pollution from parameterized vararg type Predicate<? super T>
    public static <T> Predicate<T> and(Predicate<? super T>... arg) { return null; }
                                                               ^
  where T is a type-variable:
    T extends Object declared in method <T>and(Predicate<? super T>...)
X.java:8: error: no suitable method found for and(Predicate<CAP#1>,Predicate<CAP#2>)
        public void error(Predicate<?> arg) { and(predicate, in(arg)); } // no compile
                                              ^
    method X.<T#1>and(Predicate<? super T#1>...) is not applicable
      (inference variable T#1 has incompatible upper bounds CAP#3,CAP#1,Object)
    method X.<T#2>and(Predicate<? super T#2>,Predicate<? super T#2>) is not applicable
      (inference variable T#2 has incompatible upper bounds CAP#3,CAP#1,Object)
  where E,T#1,T#2 are type-variables:
    E extends Object declared in class FilteredCollection
    T#1 extends Object declared in method <T#1>and(Predicate<? super T#1>...)
    T#2 extends Object declared in method <T#2>and(Predicate<? super T#2>,Predicate<? super T#2>)
  where CAP#1,CAP#2,CAP#3 are fresh type-variables:
    CAP#1 extends Object super: E from capture of ? super E
    CAP#2 extends Object from capture of ?
    CAP#3 extends Object from capture of ?
1 error
1 warning

----------------------------------------