Failed

org.eclipse.jdt.core.tests.compiler.regression.MethodVerifyTest.test330435 - 1.8 (from org.eclipse.jdt.core.tests.compiler.regression.TestAll)

Failing for the past 6 builds (Since Failed#130 )
Took 0.74 sec.

Error Message

test330435 - Eclipse found error(s) but Javac only found warning(s).
----------- Expected ------------
----------\n
1. ERROR in X.java (at line 3)\n
 String[] a = A.asList(args).toArray(new String[0]);\n
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n
Type mismatch: cannot convert from Object[] to String[]\n
----------\n

------------ but was ------------
./A.java:2: warning: [unchecked] Possible heap pollution from parameterized vararg type T\n
 public static <T> B<T> asList(T... tab) {\n
                                    ^\n
  where T is a type-variable:\n
    T extends Object declared in method <T>asList(T...)\n
1 warning\n

--------- Difference is ----------
 expected:<[----------\n
1. ERROR in X.java (at line 3)\n
 String[] a = A.asList(args).toArray(new String[0]);\n
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n
Type mismatch: cannot convert from Object[] to String[]\n
----------]\n
> but was:<[./A.java:2: warning: [unchecked] Possible heap pollution from parameterized vararg type T\n
 public static <T> B<T> asList(T... tab) {\n
                                    ^\n
  where T is a type-variable:\n
    T extends Object declared in method <T>asList(T...)\n
1 warning]\n
>

Stacktrace

junit.framework.ComparisonFailure: 
test330435 - Eclipse found error(s) but Javac only found warning(s).
----------- Expected ------------
----------\n
1. ERROR in X.java (at line 3)\n
	String[] a = A.asList(args).toArray(new String[0]);\n
	             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n
Type mismatch: cannot convert from Object[] to String[]\n
----------\n

------------ but was ------------
./A.java:2: warning: [unchecked] Possible heap pollution from parameterized vararg type T\n
	public static <T> B<T> asList(T... tab) {\n
	                                   ^\n
  where T is a type-variable:\n
    T extends Object declared in method <T>asList(T...)\n
1 warning\n

--------- Difference is ----------
 expected:<[----------\n
1. ERROR in X.java (at line 3)\n
	String[] a = A.asList(args).toArray(new String[0]);\n
	             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n
Type mismatch: cannot convert from Object[] to String[]\n
----------]\n
> but was:<[./A.java:2: warning: [unchecked] Possible heap pollution from parameterized vararg type T\n
	public static <T> B<T> asList(T... tab) {\n
	                                   ^\n
  where T is a type-variable:\n
    T extends Object declared in method <T>asList(T...)\n
1 warning]\n
>
	at org.eclipse.jdt.core.tests.compiler.regression.MethodVerifyTest.test330435(MethodVerifyTest.java:12264)

Standard Output

org.eclipse.jdt.core.tests.compiler.regression.MethodVerifyTest#test330435 - 1.8
X.java [
public class X {
	String[] foo(Object[] args) {
		String[] a = A.asList(args).toArray(new String[0]);
		return a;
	}
}
]


Full results sent to /tmp/comptest/run.1576299801366/1.8.0_202_20191214_050322.txt

Standard Error

--- javac err: ---
A.java:2: warning: [unchecked] Possible heap pollution from parameterized vararg type T
	public static <T> B<T> asList(T... tab) {
	                                   ^
  where T is a type-variable:
    T extends Object declared in method <T>asList(T...)
1 warning

--- javac err: ---
./A.java:2: warning: [unchecked] Possible heap pollution from parameterized vararg type T
	public static <T> B<T> asList(T... tab) {
	                                   ^
  where T is a type-variable:
    T extends Object declared in method <T>asList(T...)
1 warning

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