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 4 builds (Since #6 )
Took 1.4 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.junit.extension.TestCase.assertStringEquals(TestCase.java:260)
	at org.eclipse.jdt.core.tests.junit.extension.TestCase.assertEquals(TestCase.java:236)
	at org.eclipse.jdt.core.tests.compiler.regression.AbstractRegressionTest.runJavac(AbstractRegressionTest.java:2048)
	at org.eclipse.jdt.core.tests.compiler.regression.AbstractRegressionTest.runTest(AbstractRegressionTest.java:2814)
	at org.eclipse.jdt.core.tests.compiler.regression.AbstractRegressionTest.runTest(AbstractRegressionTest.java:2539)
	at org.eclipse.jdt.core.tests.compiler.regression.AbstractRegressionTest.runNegativeTest(AbstractRegressionTest.java:2220)
	at org.eclipse.jdt.core.tests.compiler.regression.MethodVerifyTest.test330435(MethodVerifyTest.java:12261)

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.1514610271420/1.8.0_131_20171230_000432.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

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