Failed

org.eclipse.jdt.core.tests.compiler.regression.NullReferenceTest.testBug291418a - 1.8 (from org.eclipse.jdt.core.tests.compiler.regression.TestAll)

Failing for the past 4 builds (Since #6 )
Took 0.62 sec.

Error Message

testBug291418a - Eclipse found error(s) but Javac only found warning(s).
----------- Expected ------------
----------\n
1. ERROR in X.java (at line 7)\n
 if (collectionVar == null);\n
     ^^^^^^^^^^^^^\n
Null comparison always yields false: The variable collectionVar cannot be null at this location\n
----------\n
2. ERROR in X.java (at line 8)\n
 if (array == null);\n
     ^^^^^\n
Null comparison always yields false: The variable array cannot be null at this location\n
----------\n
3. ERROR in X.java (at line 9)\n
 if (argArray == null);\n
     ^^^^^^^^\n
Null comparison always yields false: The variable argArray cannot be null at this location\n
----------\n
4. ERROR in X.java (at line 14)\n
 if (array == null);\n
     ^^^^^\n
Null comparison always yields false: The variable array cannot be null at this location\n
----------\n
5. ERROR in X.java (at line 15)\n
 if (argArray == null);\n
     ^^^^^^^^\n
Null comparison always yields false: The variable argArray cannot be null at this location\n
----------\n
6. ERROR in X.java (at line 20)\n
 if (array == null);\n
     ^^^^^\n
Null comparison always yields false: The variable array cannot be null at this location\n
----------\n
7. ERROR in X.java (at line 21)\n
 if (argArray == null);\n
     ^^^^^^^^\n
Null comparison always yields false: The variable argArray cannot be null at this location\n
----------\n
8. ERROR in X.java (at line 24)\n
 if (array == null);\n
     ^^^^^\n
Null comparison always yields false: The variable array cannot be null at this location\n
----------\n
9. ERROR in X.java (at line 25)\n
 if (argArray == null);\n
     ^^^^^^^^\n
Null comparison always yields false: The variable argArray cannot be null at this location\n
----------\n

------------ but was ------------
X.java:7: warning: [empty] empty statement after if\n
        if (collectionVar == null);\n
                                  ^\n
X.java:8: warning: [empty] empty statement after if\n
        if (array == null);\n
                          ^\n
X.java:9: warning: [empty] empty statement after if\n
   if (argArray == null);\n
                        ^\n
X.java:14: warning: [empty] empty statement after if\n
        if (array == null);\n
                          ^\n
X.java:15: warning: [empty] empty statement after if\n
   if (argArray == null);\n
                        ^\n
X.java:20: warning: [empty] empty statement after if\n
        if (array == null);\n
                          ^\n
X.java:21: warning: [empty] empty statement after if\n
   if (argArray == null);\n
                        ^\n
X.java:24: warning: [empty] empty statement after if\n
        if (array == null);\n
                          ^\n
X.java:25: warning: [empty] empty statement after if\n
   if (argArray == null);\n
                        ^\n
9 warnings\n

--------- Difference is ----------
 expected:<[----------\n
1. ERROR in X.java (at line 7)\n
 if (collectionVar == null);\n
     ^^^^^^^^^^^^^\n
Null comparison always yields false: The variable collectionVar cannot be null at this location\n
----------\n
2. ERROR in X.java (at line 8)\n
 if (array == null);\n
     ^^^^^\n
Null comparison always yields false: The variable array cannot be null at this location\n
----------\n
3. ERROR in X.java (at line 9)\n
 if (argArray == null);\n
     ^^^^^^^^\n
Null comparison always yields false: The variable argArray cannot be null at this location\n
----------\n
4. ERROR in X.java (at line 14)\n
 if (array == null);\n
     ^^^^^\n
Null comparison always yields false: The variable array cannot be null at this location\n
----------\n
5. ERROR in X.java (at line 15)\n
 if (argArray == null);\n
     ^^^^^^^^\n
Null comparison always yields false: The variable argArray cannot be null at this location\n
----------\n
6. ERROR in X.java (at line 20)\n
 if (array == null);\n
     ^^^^^\n
Null comparison always yields false: The variable array cannot be null at this location\n
----------\n
7. ERROR in X.java (at line 21)\n
 if (argArray == null);\n
     ^^^^^^^^\n
Null comparison always yields false: The variable argArray cannot be null at this location\n
----------\n
8. ERROR in X.java (at line 24)\n
 if (array == null);\n
     ^^^^^\n
Null comparison always yields false: The variable array cannot be null at this location\n
----------\n
9. ERROR in X.java (at line 25)\n
 if (argArray == null);\n
     ^^^^^^^^\n
Null comparison always yields false: The variable argArray cannot be null at this location\n
----------]\n
> but was:<[X.java:7: warning: [empty] empty statement after if\n
        if (collectionVar == null);\n
                                  ^\n
X.java:8: warning: [empty] empty statement after if\n
        if (array == null);\n
                          ^\n
X.java:9: warning: [empty] empty statement after if\n
   if (argArray == null);\n
                        ^\n
X.java:14: warning: [empty] empty statement after if\n
        if (array == null);\n
                          ^\n
X.java:15: warning: [empty] empty statement after if\n
   if (argArray == null);\n
                        ^\n
X.java:20: warning: [empty] empty statement after if\n
        if (array == null);\n
                          ^\n
X.java:21: warning: [empty] empty statement after if\n
   if (argArray == null);\n
                        ^\n
X.java:24: warning: [empty] empty statement after if\n
        if (array == null);\n
                          ^\n
X.java:25: warning: [empty] empty statement after if\n
   if (argArray == null);\n
                        ^\n
9 warnings]\n
>

Stacktrace

junit.framework.ComparisonFailure: testBug291418a - Eclipse found error(s) but Javac only found warning(s).
----------- Expected ------------
----------\n
1. ERROR in X.java (at line 7)\n
	if (collectionVar == null);\n
	    ^^^^^^^^^^^^^\n
Null comparison always yields false: The variable collectionVar cannot be null at this location\n
----------\n
2. ERROR in X.java (at line 8)\n
	if (array == null);\n
	    ^^^^^\n
Null comparison always yields false: The variable array cannot be null at this location\n
----------\n
3. ERROR in X.java (at line 9)\n
	if (argArray == null);\n
	    ^^^^^^^^\n
Null comparison always yields false: The variable argArray cannot be null at this location\n
----------\n
4. ERROR in X.java (at line 14)\n
	if (array == null);\n
	    ^^^^^\n
Null comparison always yields false: The variable array cannot be null at this location\n
----------\n
5. ERROR in X.java (at line 15)\n
	if (argArray == null);\n
	    ^^^^^^^^\n
Null comparison always yields false: The variable argArray cannot be null at this location\n
----------\n
6. ERROR in X.java (at line 20)\n
	if (array == null);\n
	    ^^^^^\n
Null comparison always yields false: The variable array cannot be null at this location\n
----------\n
7. ERROR in X.java (at line 21)\n
	if (argArray == null);\n
	    ^^^^^^^^\n
Null comparison always yields false: The variable argArray cannot be null at this location\n
----------\n
8. ERROR in X.java (at line 24)\n
	if (array == null);\n
	    ^^^^^\n
Null comparison always yields false: The variable array cannot be null at this location\n
----------\n
9. ERROR in X.java (at line 25)\n
	if (argArray == null);\n
	    ^^^^^^^^\n
Null comparison always yields false: The variable argArray cannot be null at this location\n
----------\n

------------ but was ------------
X.java:7: warning: [empty] empty statement after if\n
        if (collectionVar == null);\n
                                  ^\n
X.java:8: warning: [empty] empty statement after if\n
        if (array == null);\n
                          ^\n
X.java:9: warning: [empty] empty statement after if\n
		 if (argArray == null);\n
		                      ^\n
X.java:14: warning: [empty] empty statement after if\n
        if (array == null);\n
                          ^\n
X.java:15: warning: [empty] empty statement after if\n
		 if (argArray == null);\n
		                      ^\n
X.java:20: warning: [empty] empty statement after if\n
        if (array == null);\n
                          ^\n
X.java:21: warning: [empty] empty statement after if\n
		 if (argArray == null);\n
		                      ^\n
X.java:24: warning: [empty] empty statement after if\n
        if (array == null);\n
                          ^\n
X.java:25: warning: [empty] empty statement after if\n
		 if (argArray == null);\n
		                      ^\n
9 warnings\n

--------- Difference is ----------
 expected:<[----------\n
1. ERROR in X.java (at line 7)\n
	if (collectionVar == null);\n
	    ^^^^^^^^^^^^^\n
Null comparison always yields false: The variable collectionVar cannot be null at this location\n
----------\n
2. ERROR in X.java (at line 8)\n
	if (array == null);\n
	    ^^^^^\n
Null comparison always yields false: The variable array cannot be null at this location\n
----------\n
3. ERROR in X.java (at line 9)\n
	if (argArray == null);\n
	    ^^^^^^^^\n
Null comparison always yields false: The variable argArray cannot be null at this location\n
----------\n
4. ERROR in X.java (at line 14)\n
	if (array == null);\n
	    ^^^^^\n
Null comparison always yields false: The variable array cannot be null at this location\n
----------\n
5. ERROR in X.java (at line 15)\n
	if (argArray == null);\n
	    ^^^^^^^^\n
Null comparison always yields false: The variable argArray cannot be null at this location\n
----------\n
6. ERROR in X.java (at line 20)\n
	if (array == null);\n
	    ^^^^^\n
Null comparison always yields false: The variable array cannot be null at this location\n
----------\n
7. ERROR in X.java (at line 21)\n
	if (argArray == null);\n
	    ^^^^^^^^\n
Null comparison always yields false: The variable argArray cannot be null at this location\n
----------\n
8. ERROR in X.java (at line 24)\n
	if (array == null);\n
	    ^^^^^\n
Null comparison always yields false: The variable array cannot be null at this location\n
----------\n
9. ERROR in X.java (at line 25)\n
	if (argArray == null);\n
	    ^^^^^^^^\n
Null comparison always yields false: The variable argArray cannot be null at this location\n
----------]\n
> but was:<[X.java:7: warning: [empty] empty statement after if\n
        if (collectionVar == null);\n
                                  ^\n
X.java:8: warning: [empty] empty statement after if\n
        if (array == null);\n
                          ^\n
X.java:9: warning: [empty] empty statement after if\n
		 if (argArray == null);\n
		                      ^\n
X.java:14: warning: [empty] empty statement after if\n
        if (array == null);\n
                          ^\n
X.java:15: warning: [empty] empty statement after if\n
		 if (argArray == null);\n
		                      ^\n
X.java:20: warning: [empty] empty statement after if\n
        if (array == null);\n
                          ^\n
X.java:21: warning: [empty] empty statement after if\n
		 if (argArray == null);\n
		                      ^\n
X.java:24: warning: [empty] empty statement after if\n
        if (array == null);\n
                          ^\n
X.java:25: warning: [empty] empty statement after if\n
		 if (argArray == null);\n
		                      ^\n
9 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:2113)
	at org.eclipse.jdt.core.tests.compiler.regression.AbstractRegressionTest.runNegativeTest(AbstractRegressionTest.java:2102)
	at org.eclipse.jdt.core.tests.compiler.regression.NullReferenceTest.testBug291418a(NullReferenceTest.java:11719)

Standard Output

org.eclipse.jdt.core.tests.compiler.regression.NullReferenceTest#testBug291418a - 1.8
X.java [
class X {
  void foo(int[] argArray) {
    int[] array = {2};
    int[] collectionVar = {1,2};
	 if(argArray == null) return;
    for(int x:collectionVar) {
        if (collectionVar == null);
        if (array == null);
		 if (argArray == null);
    }
	 int count = 0;
    do {
		 count++;
        if (array == null);
		 if (argArray == null);
    } while (count<10);
	 array = new int[0];
	 if (argArray == null) return;
    for (int i=0; i<2; i++) {
        if (array == null);
		 if (argArray == null);
    }
    while (true) {
        if (array == null);
		 if (argArray == null);
    }
  }
}
]


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

Standard Error

--- javac err: ---
X.java:7: warning: [empty] empty statement after if
        if (collectionVar == null);
                                  ^
X.java:8: warning: [empty] empty statement after if
        if (array == null);
                          ^
X.java:9: warning: [empty] empty statement after if
		 if (argArray == null);
		                      ^
X.java:14: warning: [empty] empty statement after if
        if (array == null);
                          ^
X.java:15: warning: [empty] empty statement after if
		 if (argArray == null);
		                      ^
X.java:20: warning: [empty] empty statement after if
        if (array == null);
                          ^
X.java:21: warning: [empty] empty statement after if
		 if (argArray == null);
		                      ^
X.java:24: warning: [empty] empty statement after if
        if (array == null);
                          ^
X.java:25: warning: [empty] empty statement after if
		 if (argArray == null);
		                      ^
9 warnings

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