Failed
org.eclipse.jdt.core.tests.compiler.regression.SwitchTest.test015 - 1.8 (from org.eclipse.jdt.core.tests.compiler.regression.TestAll)
Error Message
test015 - Eclipse found error(s) but Javac only found warning(s). ----------- Expected ------------ ----------\n 1. ERROR in X.java (at line 18)\n case 6://WRONG\n ^^^^^^\n Switch case may be entered by falling through previous case. If intended, add a new comment //$FALL-THROUGH$ on the line above\n ----------\n ------------ but was ------------ X.java:8: warning: [fallthrough] possible fall-through into case\n case 2://OK\n ^\n X.java:10: warning: [fallthrough] possible fall-through into case\n case 3://OK\n ^\n X.java:13: warning: [fallthrough] possible fall-through into case\n case 4://OK\n ^\n X.java:18: warning: [fallthrough] possible fall-through into case\n case 6://WRONG\n ^\n X.java:22: warning: [fallthrough] possible fall-through into case\n case 7://OK\n ^\n 5 warnings\n --------- Difference is ---------- expected:<[----------\n 1. ERROR in X.java (at line 18)\n case 6://WRONG\n ^^^^^^\n Switch case may be entered by falling through previous case. If intended, add a new comment //$FALL-THROUGH$ on the line above\n ----------]\n > but was:<[X.java:8: warning: [fallthrough] possible fall-through into case\n case 2://OK\n ^\n X.java:10: warning: [fallthrough] possible fall-through into case\n case 3://OK\n ^\n X.java:13: warning: [fallthrough] possible fall-through into case\n case 4://OK\n ^\n X.java:18: warning: [fallthrough] possible fall-through into case\n case 6://WRONG\n ^\n X.java:22: warning: [fallthrough] possible fall-through into case\n case 7://OK\n ^\n 5 warnings]\n >
Stacktrace
junit.framework.ComparisonFailure: test015 - Eclipse found error(s) but Javac only found warning(s). ----------- Expected ------------ ----------\n 1. ERROR in X.java (at line 18)\n case 6://WRONG\n ^^^^^^\n Switch case may be entered by falling through previous case. If intended, add a new comment //$FALL-THROUGH$ on the line above\n ----------\n ------------ but was ------------ X.java:8: warning: [fallthrough] possible fall-through into case\n case 2://OK\n ^\n X.java:10: warning: [fallthrough] possible fall-through into case\n case 3://OK\n ^\n X.java:13: warning: [fallthrough] possible fall-through into case\n case 4://OK\n ^\n X.java:18: warning: [fallthrough] possible fall-through into case\n case 6://WRONG\n ^\n X.java:22: warning: [fallthrough] possible fall-through into case\n case 7://OK\n ^\n 5 warnings\n --------- Difference is ---------- expected:<[----------\n 1. ERROR in X.java (at line 18)\n case 6://WRONG\n ^^^^^^\n Switch case may be entered by falling through previous case. If intended, add a new comment //$FALL-THROUGH$ on the line above\n ----------]\n > but was:<[X.java:8: warning: [fallthrough] possible fall-through into case\n case 2://OK\n ^\n X.java:10: warning: [fallthrough] possible fall-through into case\n case 3://OK\n ^\n X.java:13: warning: [fallthrough] possible fall-through into case\n case 4://OK\n ^\n X.java:18: warning: [fallthrough] possible fall-through into case\n case 6://WRONG\n ^\n X.java:22: warning: [fallthrough] possible fall-through into case\n case 7://OK\n ^\n 5 warnings]\n > at org.eclipse.jdt.core.tests.compiler.regression.SwitchTest.test015(SwitchTest.java:653)
Standard Output
org.eclipse.jdt.core.tests.compiler.regression.SwitchTest#test015 - 1.8 X.java [ public class X { void foo1(int i) { switch (i) { case 0://OK case 1://OK System.out.println(); // $FALL-THROUGH$ case 2://OK System.out.println(); // $FALL-THROUGH$ case 3://OK System.out.println(); // $FALL-THROUGH$ - some allowed explanation case 4://OK case 5://OK System.out.println(); // $FALL-THROUGH$ - not last comment, thus inoperant // last comment is not fall-through explanation case 6://WRONG // $FALL-THROUGH$ - useless since not leading the case System.out.println(); /* $FALL-THROUGH$ - block comment, is also allowed */ case 7://OK System.out.println("aa"); //$NON-NLS-1$ } } } ] Full results sent to /home/jenkins/agent/workspace/eclipse.jdt.core-run.javac-1.8/tmp/comptest/run.1584479137560/1.8.0_202_20200317_210541.txt
Standard Error
--- javac err: --- X.java:8: warning: [fallthrough] possible fall-through into case case 2://OK ^ X.java:10: warning: [fallthrough] possible fall-through into case case 3://OK ^ X.java:13: warning: [fallthrough] possible fall-through into case case 4://OK ^ X.java:18: warning: [fallthrough] possible fall-through into case case 6://WRONG ^ X.java:22: warning: [fallthrough] possible fall-through into case case 7://OK ^ 5 warnings ----------------------------------------