Failed
org.eclipse.jdt.core.tests.compiler.regression.GenericsRegressionTest_1_7.test0052 - 1.8 (from org.eclipse.jdt.core.tests.compiler.regression.TestAll)
Error Message
test0052 - Eclipse found error(s) but Javac only found warning(s). ----------- Expected ------------ ----------\n 1. ERROR in X.java (at line 5)\n X<Number> x = new X<Number>(1);\n ^\n Redundant specification of type arguments <Number>\n ----------\n 2. ERROR in X.java (at line 6)\n X<String> x2 = new X<String>("SUCCESS");\n ^\n Redundant specification of type arguments <String>\n ----------\n 3. ERROR in X.java (at line 7)\n X<Integer> x3 = new X<Integer>(1);\n ^\n Redundant specification of type arguments <Integer>\n ----------\n 4. ERROR in X.java (at line 8)\n X<AX> x4 = new X<AX>(new AX());\n ^\n Redundant specification of type arguments <AX>\n ----------\n 5. ERROR in X.java (at line 9)\n X<? extends AX> x5 = new X<AX<String>>(new AX<String>());\n ^\n Redundant specification of type arguments <AX<String>>\n ----------\n 6. ERROR in X.java (at line 10)\n X<?> x6 = new X<AX<String>>(new AX<String>());\n ^\n Redundant specification of type arguments <AX<String>>\n ----------\n 7. ERROR in X.java (at line 11)\n X<Class<? extends Object>> x7 = new X<Class<? extends Object>>();\n ^\n Redundant specification of type arguments <Class<? extends Object>>\n ----------\n ------------ but was ------------ X.java:8: warning: [rawtypes] found raw type: AX\n X<AX> x4 = new X<AX>(new AX());\n ^\n missing type arguments for generic class AX<T>\n where T is a type-variable:\n T extends Object declared in class AX\n X.java:8: warning: [rawtypes] found raw type: AX\n X<AX> x4 = new X<AX>(new AX());\n ^\n missing type arguments for generic class AX<T>\n where T is a type-variable:\n T extends Object declared in class AX\n X.java:8: warning: [rawtypes] found raw type: AX\n X<AX> x4 = new X<AX>(new AX());\n ^\n missing type arguments for generic class AX<T>\n where T is a type-variable:\n T extends Object declared in class AX\n X.java:9: warning: [rawtypes] found raw type: AX\n X<? extends AX> x5 = new X<AX<String>>(new AX<String>());\n ^\n missing type arguments for generic class AX<T>\n where T is a type-variable:\n T extends Object declared in class AX\n 4 warnings\n --------- Difference is ---------- expected:<[----------\n 1. ERROR in X.java (at line 5)\n X<Number> x = new X<Number>(1);\n ^\n Redundant specification of type arguments <Number>\n ----------\n 2. ERROR in X.java (at line 6)\n X<String> x2 = new X<String>("SUCCESS");\n ^\n Redundant specification of type arguments <String>\n ----------\n 3. ERROR in X.java (at line 7)\n X<Integer> x3 = new X<Integer>(1);\n ^\n Redundant specification of type arguments <Integer>\n ----------\n 4. ERROR in X.java (at line 8)\n X<AX> x4 = new X<AX>(new AX());\n ^\n Redundant specification of type arguments <AX>\n ----------\n 5. ERROR in X.java (at line 9)\n X<? extends AX> x5 = new X<AX<String>>(new AX<String>());\n ^\n Redundant specification of type arguments <AX<String>>\n ----------\n 6. ERROR in X.java (at line 10)\n X<?> x6 = new X<AX<String>>(new AX<String>());\n ^\n Redundant specification of type arguments <AX<String>>\n ----------\n 7. ERROR in X.java (at line 11)\n X<Class<? extends Object>> x7 = new X<Class<? extends Object>>();\n ^\n Redundant specification of type arguments <Class<? extends Object>>\n ----------]\n > but was:<[X.java:8: warning: [rawtypes] found raw type: AX\n X<AX> x4 = new X<AX>(new AX());\n ^\n missing type arguments for generic class AX<T>\n where T is a type-variable:\n T extends Object declared in class AX\n X.java:8: warning: [rawtypes] found raw type: AX\n X<AX> x4 = new X<AX>(new AX());\n ^\n missing type arguments for generic class AX<T>\n where T is a type-variable:\n T extends Object declared in class AX\n X.java:8: warning: [rawtypes] found raw type: AX\n X<AX> x4 = new X<AX>(new AX());\n ^\n missing type arguments for generic class AX<T>\n where T is a type-variable:\n T extends Object declared in class AX\n X.java:9: warning: [rawtypes] found raw type: AX\n X<? extends AX> x5 = new X<AX<String>>(new AX<String>());\n ^\n missing type arguments for generic class AX<T>\n where T is a type-variable:\n T extends Object declared in class AX\n 4 warnings]\n >
Stacktrace
junit.framework.ComparisonFailure: test0052 - Eclipse found error(s) but Javac only found warning(s). ----------- Expected ------------ ----------\n 1. ERROR in X.java (at line 5)\n X<Number> x = new X<Number>(1);\n ^\n Redundant specification of type arguments <Number>\n ----------\n 2. ERROR in X.java (at line 6)\n X<String> x2 = new X<String>("SUCCESS");\n ^\n Redundant specification of type arguments <String>\n ----------\n 3. ERROR in X.java (at line 7)\n X<Integer> x3 = new X<Integer>(1);\n ^\n Redundant specification of type arguments <Integer>\n ----------\n 4. ERROR in X.java (at line 8)\n X<AX> x4 = new X<AX>(new AX());\n ^\n Redundant specification of type arguments <AX>\n ----------\n 5. ERROR in X.java (at line 9)\n X<? extends AX> x5 = new X<AX<String>>(new AX<String>());\n ^\n Redundant specification of type arguments <AX<String>>\n ----------\n 6. ERROR in X.java (at line 10)\n X<?> x6 = new X<AX<String>>(new AX<String>());\n ^\n Redundant specification of type arguments <AX<String>>\n ----------\n 7. ERROR in X.java (at line 11)\n X<Class<? extends Object>> x7 = new X<Class<? extends Object>>();\n ^\n Redundant specification of type arguments <Class<? extends Object>>\n ----------\n ------------ but was ------------ X.java:8: warning: [rawtypes] found raw type: AX\n X<AX> x4 = new X<AX>(new AX());\n ^\n missing type arguments for generic class AX<T>\n where T is a type-variable:\n T extends Object declared in class AX\n X.java:8: warning: [rawtypes] found raw type: AX\n X<AX> x4 = new X<AX>(new AX());\n ^\n missing type arguments for generic class AX<T>\n where T is a type-variable:\n T extends Object declared in class AX\n X.java:8: warning: [rawtypes] found raw type: AX\n X<AX> x4 = new X<AX>(new AX());\n ^\n missing type arguments for generic class AX<T>\n where T is a type-variable:\n T extends Object declared in class AX\n X.java:9: warning: [rawtypes] found raw type: AX\n X<? extends AX> x5 = new X<AX<String>>(new AX<String>());\n ^\n missing type arguments for generic class AX<T>\n where T is a type-variable:\n T extends Object declared in class AX\n 4 warnings\n --------- Difference is ---------- expected:<[----------\n 1. ERROR in X.java (at line 5)\n X<Number> x = new X<Number>(1);\n ^\n Redundant specification of type arguments <Number>\n ----------\n 2. ERROR in X.java (at line 6)\n X<String> x2 = new X<String>("SUCCESS");\n ^\n Redundant specification of type arguments <String>\n ----------\n 3. ERROR in X.java (at line 7)\n X<Integer> x3 = new X<Integer>(1);\n ^\n Redundant specification of type arguments <Integer>\n ----------\n 4. ERROR in X.java (at line 8)\n X<AX> x4 = new X<AX>(new AX());\n ^\n Redundant specification of type arguments <AX>\n ----------\n 5. ERROR in X.java (at line 9)\n X<? extends AX> x5 = new X<AX<String>>(new AX<String>());\n ^\n Redundant specification of type arguments <AX<String>>\n ----------\n 6. ERROR in X.java (at line 10)\n X<?> x6 = new X<AX<String>>(new AX<String>());\n ^\n Redundant specification of type arguments <AX<String>>\n ----------\n 7. ERROR in X.java (at line 11)\n X<Class<? extends Object>> x7 = new X<Class<? extends Object>>();\n ^\n Redundant specification of type arguments <Class<? extends Object>>\n ----------]\n > but was:<[X.java:8: warning: [rawtypes] found raw type: AX\n X<AX> x4 = new X<AX>(new AX());\n ^\n missing type arguments for generic class AX<T>\n where T is a type-variable:\n T extends Object declared in class AX\n X.java:8: warning: [rawtypes] found raw type: AX\n X<AX> x4 = new X<AX>(new AX());\n ^\n missing type arguments for generic class AX<T>\n where T is a type-variable:\n T extends Object declared in class AX\n X.java:8: warning: [rawtypes] found raw type: AX\n X<AX> x4 = new X<AX>(new AX());\n ^\n missing type arguments for generic class AX<T>\n where T is a type-variable:\n T extends Object declared in class AX\n X.java:9: warning: [rawtypes] found raw type: AX\n X<? extends AX> x5 = new X<AX<String>>(new AX<String>());\n ^\n missing type arguments for generic class AX<T>\n where T is a type-variable:\n T extends Object declared in class AX\n 4 warnings]\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.GenericsRegressionTest_1_7.test0052(GenericsRegressionTest_1_7.java:2011)
Standard Output
org.eclipse.jdt.core.tests.compiler.regression.GenericsRegressionTest_1_7#test0052 - 1.8 X.java [ public class X<E> { X(E e) {} X() {} public static void main(String[] args) { X<Number> x = new X<Number>(1); X<String> x2 = new X<String>("SUCCESS"); X<Integer> x3 = new X<Integer>(1); X<AX> x4 = new X<AX>(new AX()); X<? extends AX> x5 = new X<AX<String>>(new AX<String>()); X<?> x6 = new X<AX<String>>(new AX<String>()); X<Class<? extends Object>> x7 = new X<Class<? extends Object>>(); } } class AX<T>{} ] Full results sent to /tmp/comptest/run.1514610271420/1.8.0_131_20171230_000432.txt
Standard Error
--- javac err: --- X.java:8: warning: [rawtypes] found raw type: AX X<AX> x4 = new X<AX>(new AX()); ^ missing type arguments for generic class AX<T> where T is a type-variable: T extends Object declared in class AX X.java:8: warning: [rawtypes] found raw type: AX X<AX> x4 = new X<AX>(new AX()); ^ missing type arguments for generic class AX<T> where T is a type-variable: T extends Object declared in class AX X.java:8: warning: [rawtypes] found raw type: AX X<AX> x4 = new X<AX>(new AX()); ^ missing type arguments for generic class AX<T> where T is a type-variable: T extends Object declared in class AX X.java:9: warning: [rawtypes] found raw type: AX X<? extends AX> x5 = new X<AX<String>>(new AX<String>()); ^ missing type arguments for generic class AX<T> where T is a type-variable: T extends Object declared in class AX 4 warnings ----------------------------------------