Failed

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

Failing for the past 55 builds (Since #64 )
Took 1.4 sec.

Error Message

test331446 - Javac found error(s) but Eclipse did not find any.
----------- Expected ------------

------------ but was ------------
X.java:6: warning: [rawtypes] found raw type: Comparator\n
  Comparator comparator = new Comparator() {\n
  ^\n
  missing type arguments for generic class Comparator<T>\n
  where T is a type-variable:\n
    T extends Object declared in interface Comparator\n
X.java:6: warning: [rawtypes] found raw type: Comparator\n
  Comparator comparator = new Comparator() {\n
                              ^\n
  missing type arguments for generic class Comparator<T>\n
  where T is a type-variable:\n
    T extends Object declared in interface Comparator\n
X.java:12: warning: [rawtypes] found raw type: ArrayList\n
  Test.assertEquals("Test", comparator, new ArrayList(), new ArrayList());\n
                                            ^\n
  missing type arguments for generic class ArrayList<E>\n
  where E is a type-variable:\n
    E extends Object declared in class ArrayList\n
X.java:12: warning: [rawtypes] found raw type: ArrayList\n
  Test.assertEquals("Test", comparator, new ArrayList(), new ArrayList());\n
                                                             ^\n
  missing type arguments for generic class ArrayList<E>\n
  where E is a type-variable:\n
    E extends Object declared in class ArrayList\n
X.java:12: error: reference to assertEquals is ambiguous\n
  Test.assertEquals("Test", comparator, new ArrayList(), new ArrayList());\n
      ^\n
  both method <T#1>assertEquals(String,Comparator<T#1>,List<T#1>,List<T#1>) in Test and method <T#2>assertEquals(String,Comparator<T#2>,T#2,T#2) in Test match\n
  where T#1,T#2 are type-variables:\n
    T#1 extends Object declared in method <T#1>assertEquals(String,Comparator<T#1>,List<T#1>,List<T#1>)\n
    T#2 extends Object declared in method <T#2>assertEquals(String,Comparator<T#2>,T#2,T#2)\n
X.java:12: warning: [unchecked] unchecked method invocation: method assertEquals in class Test is applied to given types\n
  Test.assertEquals("Test", comparator, new ArrayList(), new ArrayList());\n
                   ^\n
  required: String,Comparator<T>,List<T>,List<T>\n
  found: String,Comparator,ArrayList,ArrayList\n
  where T is a type-variable:\n
    T extends Object declared in method <T>assertEquals(String,Comparator<T>,List<T>,List<T>)\n
X.java:12: warning: [unchecked] unchecked conversion\n
  Test.assertEquals("Test", comparator, new ArrayList(), new ArrayList());\n
                            ^\n
  required: Comparator<T>\n
  found:    Comparator\n
  where T is a type-variable:\n
    T extends Object declared in method <T>assertEquals(String,Comparator<T>,List<T>,List<T>)\n
X.java:12: warning: [unchecked] unchecked conversion\n
  Test.assertEquals("Test", comparator, new ArrayList(), new ArrayList());\n
                                        ^\n
  required: List<T>\n
  found:    ArrayList\n
  where T is a type-variable:\n
    T extends Object declared in method <T>assertEquals(String,Comparator<T>,List<T>,List<T>)\n
X.java:12: warning: [unchecked] unchecked conversion\n
  Test.assertEquals("Test", comparator, new ArrayList(), new ArrayList());\n
                                                         ^\n
  required: List<T>\n
  found:    ArrayList\n
  where T is a type-variable:\n
    T extends Object declared in method <T>assertEquals(String,Comparator<T>,List<T>,List<T>)\n
1 error\n
8 warnings\n

--------- Difference is ----------
 expected:<[]> but was:<[X.java:6: warning: [rawtypes] found raw type: Comparator\n
  Comparator comparator = new Comparator() {\n
  ^\n
  missing type arguments for generic class Comparator<T>\n
  where T is a type-variable:\n
    T extends Object declared in interface Comparator\n
X.java:6: warning: [rawtypes] found raw type: Comparator\n
  Comparator comparator = new Comparator() {\n
                              ^\n
  missing type arguments for generic class Comparator<T>\n
  where T is a type-variable:\n
    T extends Object declared in interface Comparator\n
X.java:12: warning: [rawtypes] found raw type: ArrayList\n
  Test.assertEquals("Test", comparator, new ArrayList(), new ArrayList());\n
                                            ^\n
  missing type arguments for generic class ArrayList<E>\n
  where E is a type-variable:\n
    E extends Object declared in class ArrayList\n
X.java:12: warning: [rawtypes] found raw type: ArrayList\n
  Test.assertEquals("Test", comparator, new ArrayList(), new ArrayList());\n
                                                             ^\n
  missing type arguments for generic class ArrayList<E>\n
  where E is a type-variable:\n
    E extends Object declared in class ArrayList\n
X.java:12: error: reference to assertEquals is ambiguous\n
  Test.assertEquals("Test", comparator, new ArrayList(), new ArrayList());\n
      ^\n
  both method <T#1>assertEquals(String,Comparator<T#1>,List<T#1>,List<T#1>) in Test and method <T#2>assertEquals(String,Comparator<T#2>,T#2,T#2) in Test match\n
  where T#1,T#2 are type-variables:\n
    T#1 extends Object declared in method <T#1>assertEquals(String,Comparator<T#1>,List<T#1>,List<T#1>)\n
    T#2 extends Object declared in method <T#2>assertEquals(String,Comparator<T#2>,T#2,T#2)\n
X.java:12: warning: [unchecked] unchecked method invocation: method assertEquals in class Test is applied to given types\n
  Test.assertEquals("Test", comparator, new ArrayList(), new ArrayList());\n
                   ^\n
  required: String,Comparator<T>,List<T>,List<T>\n
  found: String,Comparator,ArrayList,ArrayList\n
  where T is a type-variable:\n
    T extends Object declared in method <T>assertEquals(String,Comparator<T>,List<T>,List<T>)\n
X.java:12: warning: [unchecked] unchecked conversion\n
  Test.assertEquals("Test", comparator, new ArrayList(), new ArrayList());\n
                            ^\n
  required: Comparator<T>\n
  found:    Comparator\n
  where T is a type-variable:\n
    T extends Object declared in method <T>assertEquals(String,Comparator<T>,List<T>,List<T>)\n
X.java:12: warning: [unchecked] unchecked conversion\n
  Test.assertEquals("Test", comparator, new ArrayList(), new ArrayList());\n
                                        ^\n
  required: List<T>\n
  found:    ArrayList\n
  where T is a type-variable:\n
    T extends Object declared in method <T>assertEquals(String,Comparator<T>,List<T>,List<T>)\n
X.java:12: warning: [unchecked] unchecked conversion\n
  Test.assertEquals("Test", comparator, new ArrayList(), new ArrayList());\n
                                                         ^\n
  required: List<T>\n
  found:    ArrayList\n
  where T is a type-variable:\n
    T extends Object declared in method <T>assertEquals(String,Comparator<T>,List<T>,List<T>)\n
1 error\n
8 warnings\n
]>

Stacktrace

junit.framework.ComparisonFailure: 
test331446 - Javac found error(s) but Eclipse did not find any.
----------- Expected ------------

------------ but was ------------
X.java:6: warning: [rawtypes] found raw type: Comparator\n
		Comparator comparator = new Comparator() {\n
		^\n
  missing type arguments for generic class Comparator<T>\n
  where T is a type-variable:\n
    T extends Object declared in interface Comparator\n
X.java:6: warning: [rawtypes] found raw type: Comparator\n
		Comparator comparator = new Comparator() {\n
		                            ^\n
  missing type arguments for generic class Comparator<T>\n
  where T is a type-variable:\n
    T extends Object declared in interface Comparator\n
X.java:12: warning: [rawtypes] found raw type: ArrayList\n
		Test.assertEquals("Test", comparator, new ArrayList(), new ArrayList());\n
		                                          ^\n
  missing type arguments for generic class ArrayList<E>\n
  where E is a type-variable:\n
    E extends Object declared in class ArrayList\n
X.java:12: warning: [rawtypes] found raw type: ArrayList\n
		Test.assertEquals("Test", comparator, new ArrayList(), new ArrayList());\n
		                                                           ^\n
  missing type arguments for generic class ArrayList<E>\n
  where E is a type-variable:\n
    E extends Object declared in class ArrayList\n
X.java:12: error: reference to assertEquals is ambiguous\n
		Test.assertEquals("Test", comparator, new ArrayList(), new ArrayList());\n
		    ^\n
  both method <T#1>assertEquals(String,Comparator<T#1>,List<T#1>,List<T#1>) in Test and method <T#2>assertEquals(String,Comparator<T#2>,T#2,T#2) in Test match\n
  where T#1,T#2 are type-variables:\n
    T#1 extends Object declared in method <T#1>assertEquals(String,Comparator<T#1>,List<T#1>,List<T#1>)\n
    T#2 extends Object declared in method <T#2>assertEquals(String,Comparator<T#2>,T#2,T#2)\n
X.java:12: warning: [unchecked] unchecked method invocation: method assertEquals in class Test is applied to given types\n
		Test.assertEquals("Test", comparator, new ArrayList(), new ArrayList());\n
		                 ^\n
  required: String,Comparator<T>,List<T>,List<T>\n
  found: String,Comparator,ArrayList,ArrayList\n
  where T is a type-variable:\n
    T extends Object declared in method <T>assertEquals(String,Comparator<T>,List<T>,List<T>)\n
X.java:12: warning: [unchecked] unchecked conversion\n
		Test.assertEquals("Test", comparator, new ArrayList(), new ArrayList());\n
		                          ^\n
  required: Comparator<T>\n
  found:    Comparator\n
  where T is a type-variable:\n
    T extends Object declared in method <T>assertEquals(String,Comparator<T>,List<T>,List<T>)\n
X.java:12: warning: [unchecked] unchecked conversion\n
		Test.assertEquals("Test", comparator, new ArrayList(), new ArrayList());\n
		                                      ^\n
  required: List<T>\n
  found:    ArrayList\n
  where T is a type-variable:\n
    T extends Object declared in method <T>assertEquals(String,Comparator<T>,List<T>,List<T>)\n
X.java:12: warning: [unchecked] unchecked conversion\n
		Test.assertEquals("Test", comparator, new ArrayList(), new ArrayList());\n
		                                                       ^\n
  required: List<T>\n
  found:    ArrayList\n
  where T is a type-variable:\n
    T extends Object declared in method <T>assertEquals(String,Comparator<T>,List<T>,List<T>)\n
1 error\n
8 warnings\n

--------- Difference is ----------
 expected:<[]> but was:<[X.java:6: warning: [rawtypes] found raw type: Comparator\n
		Comparator comparator = new Comparator() {\n
		^\n
  missing type arguments for generic class Comparator<T>\n
  where T is a type-variable:\n
    T extends Object declared in interface Comparator\n
X.java:6: warning: [rawtypes] found raw type: Comparator\n
		Comparator comparator = new Comparator() {\n
		                            ^\n
  missing type arguments for generic class Comparator<T>\n
  where T is a type-variable:\n
    T extends Object declared in interface Comparator\n
X.java:12: warning: [rawtypes] found raw type: ArrayList\n
		Test.assertEquals("Test", comparator, new ArrayList(), new ArrayList());\n
		                                          ^\n
  missing type arguments for generic class ArrayList<E>\n
  where E is a type-variable:\n
    E extends Object declared in class ArrayList\n
X.java:12: warning: [rawtypes] found raw type: ArrayList\n
		Test.assertEquals("Test", comparator, new ArrayList(), new ArrayList());\n
		                                                           ^\n
  missing type arguments for generic class ArrayList<E>\n
  where E is a type-variable:\n
    E extends Object declared in class ArrayList\n
X.java:12: error: reference to assertEquals is ambiguous\n
		Test.assertEquals("Test", comparator, new ArrayList(), new ArrayList());\n
		    ^\n
  both method <T#1>assertEquals(String,Comparator<T#1>,List<T#1>,List<T#1>) in Test and method <T#2>assertEquals(String,Comparator<T#2>,T#2,T#2) in Test match\n
  where T#1,T#2 are type-variables:\n
    T#1 extends Object declared in method <T#1>assertEquals(String,Comparator<T#1>,List<T#1>,List<T#1>)\n
    T#2 extends Object declared in method <T#2>assertEquals(String,Comparator<T#2>,T#2,T#2)\n
X.java:12: warning: [unchecked] unchecked method invocation: method assertEquals in class Test is applied to given types\n
		Test.assertEquals("Test", comparator, new ArrayList(), new ArrayList());\n
		                 ^\n
  required: String,Comparator<T>,List<T>,List<T>\n
  found: String,Comparator,ArrayList,ArrayList\n
  where T is a type-variable:\n
    T extends Object declared in method <T>assertEquals(String,Comparator<T>,List<T>,List<T>)\n
X.java:12: warning: [unchecked] unchecked conversion\n
		Test.assertEquals("Test", comparator, new ArrayList(), new ArrayList());\n
		                          ^\n
  required: Comparator<T>\n
  found:    Comparator\n
  where T is a type-variable:\n
    T extends Object declared in method <T>assertEquals(String,Comparator<T>,List<T>,List<T>)\n
X.java:12: warning: [unchecked] unchecked conversion\n
		Test.assertEquals("Test", comparator, new ArrayList(), new ArrayList());\n
		                                      ^\n
  required: List<T>\n
  found:    ArrayList\n
  where T is a type-variable:\n
    T extends Object declared in method <T>assertEquals(String,Comparator<T>,List<T>,List<T>)\n
X.java:12: warning: [unchecked] unchecked conversion\n
		Test.assertEquals("Test", comparator, new ArrayList(), new ArrayList());\n
		                                                       ^\n
  required: List<T>\n
  found:    ArrayList\n
  where T is a type-variable:\n
    T extends Object declared in method <T>assertEquals(String,Comparator<T>,List<T>,List<T>)\n
1 error\n
8 warnings\n
]>
	at org.eclipse.jdt.core.tests.compiler.regression.MethodVerifyTest.test331446(MethodVerifyTest.java:12374)

Standard Output

org.eclipse.jdt.core.tests.compiler.regression.MethodVerifyTest#test331446 - 1.8
X.java [
import java.util.ArrayList;
import java.util.Comparator;

public class X {
	public static void testAmbiguity() {
		Comparator comparator = new Comparator() {
			
			public int compare(Object o1, Object o2) {
				return 0;
			}
		};
		Test.assertEquals("Test", comparator, new ArrayList(), new ArrayList());
	}
}

]


Full results sent to /tmp/genie.jdt/comptest/run.1568433798825/1.8.0_162_20190914_000328.txt

Standard Error

--- javac err: ---
X.java:6: warning: [rawtypes] found raw type: Comparator
		Comparator comparator = new Comparator() {
		^
  missing type arguments for generic class Comparator<T>
  where T is a type-variable:
    T extends Object declared in interface Comparator
X.java:6: warning: [rawtypes] found raw type: Comparator
		Comparator comparator = new Comparator() {
		                            ^
  missing type arguments for generic class Comparator<T>
  where T is a type-variable:
    T extends Object declared in interface Comparator
X.java:12: warning: [rawtypes] found raw type: ArrayList
		Test.assertEquals("Test", comparator, new ArrayList(), new ArrayList());
		                                          ^
  missing type arguments for generic class ArrayList<E>
  where E is a type-variable:
    E extends Object declared in class ArrayList
X.java:12: warning: [rawtypes] found raw type: ArrayList
		Test.assertEquals("Test", comparator, new ArrayList(), new ArrayList());
		                                                           ^
  missing type arguments for generic class ArrayList<E>
  where E is a type-variable:
    E extends Object declared in class ArrayList
X.java:12: error: reference to assertEquals is ambiguous
		Test.assertEquals("Test", comparator, new ArrayList(), new ArrayList());
		    ^
  both method <T#1>assertEquals(String,Comparator<T#1>,List<T#1>,List<T#1>) in Test and method <T#2>assertEquals(String,Comparator<T#2>,T#2,T#2) in Test match
  where T#1,T#2 are type-variables:
    T#1 extends Object declared in method <T#1>assertEquals(String,Comparator<T#1>,List<T#1>,List<T#1>)
    T#2 extends Object declared in method <T#2>assertEquals(String,Comparator<T#2>,T#2,T#2)
X.java:12: warning: [unchecked] unchecked method invocation: method assertEquals in class Test is applied to given types
		Test.assertEquals("Test", comparator, new ArrayList(), new ArrayList());
		                 ^
  required: String,Comparator<T>,List<T>,List<T>
  found: String,Comparator,ArrayList,ArrayList
  where T is a type-variable:
    T extends Object declared in method <T>assertEquals(String,Comparator<T>,List<T>,List<T>)
X.java:12: warning: [unchecked] unchecked conversion
		Test.assertEquals("Test", comparator, new ArrayList(), new ArrayList());
		                          ^
  required: Comparator<T>
  found:    Comparator
  where T is a type-variable:
    T extends Object declared in method <T>assertEquals(String,Comparator<T>,List<T>,List<T>)
X.java:12: warning: [unchecked] unchecked conversion
		Test.assertEquals("Test", comparator, new ArrayList(), new ArrayList());
		                                      ^
  required: List<T>
  found:    ArrayList
  where T is a type-variable:
    T extends Object declared in method <T>assertEquals(String,Comparator<T>,List<T>,List<T>)
X.java:12: warning: [unchecked] unchecked conversion
		Test.assertEquals("Test", comparator, new ArrayList(), new ArrayList());
		                                                       ^
  required: List<T>
  found:    ArrayList
  where T is a type-variable:
    T extends Object declared in method <T>assertEquals(String,Comparator<T>,List<T>,List<T>)
1 error
8 warnings

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