Failed

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

Failing for the past 1 build (Since Failed#9 )
Took 0.75 sec.

Error Message

test127 - Eclipse/Javac standard error mismatch.
----------- Expected ------------
java.lang.ClassCastException
------------ but was ------------
Exception in thread "main" java.lang.ClassCastException: X$Enum1 cannot be cast to X$Enum2\n
 at X.main(X.java:19)
--------- Difference is ----------
 expected:<[java.lang.ClassCastException]> but was:<[Exception in thread "main" java.lang.ClassCastException: X$Enum1 cannot be cast to X$Enum2\n
 at X.main(X.java:19)]>

Stacktrace

junit.framework.ComparisonFailure: test127 - Eclipse/Javac standard error mismatch.
----------- Expected ------------
java.lang.ClassCastException
------------ but was ------------
Exception in thread "main" java.lang.ClassCastException: X$Enum1 cannot be cast to X$Enum2\n
	at X.main(X.java:19)
--------- Difference is ----------
 expected:<[java.lang.ClassCastException]> but was:<[Exception in thread "main" java.lang.ClassCastException: X$Enum1 cannot be cast to X$Enum2\n
	at X.main(X.java:19)]>
	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:2072)
	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:2301)
	at org.eclipse.jdt.core.tests.compiler.regression.AbstractRegressionTest.runNegativeTest(AbstractRegressionTest.java:2289)
	at org.eclipse.jdt.core.tests.compiler.regression.MethodVerifyTest.test127(MethodVerifyTest.java:8738)

Standard Output

org.eclipse.jdt.core.tests.compiler.regression.MethodVerifyTest#test127 - 1.8
X.java [
public class X {
  enum Enum1 {
    value;
  }
  enum Enum2 {
    value;
  }
  static abstract class A<T> {
    abstract <U extends T> U foo();
  }
  static class B extends A<Enum<?>> {
    @Override
    Enum<?> foo() {
      return Enum1.value;
    }  
  }
  public static void main(String[] args) {
    A<Enum<?>> a = new B();
    Enum2 value = a.foo();
  }
}
]


Full results sent to /tmp/comptest/run.1514610271420/1.8.0_131_20171230_000432.txt

Standard Error

--- javac err: ---
X.java:13: warning: [unchecked] foo() in B overrides <U>foo() in A
    Enum<?> foo() {
            ^
  return type requires unchecked conversion from Enum<?> to U
  where U,T are type-variables:
    U extends T declared in method <U>foo()
    T extends Object declared in class A
1 warning

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