Failed

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

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

Error Message

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

------------ but was ------------
----------\n
1. ERROR in test\PotNullInLoop.java (at line 14)\n
 potNull.hashCode(); // ERROR 1: pot null, but nothing reported\n
 ^^^^^^^\n
Null pointer access: The variable potNull can only be null at this location\n
----------\n
2. ERROR in test\PotNullInLoop.java (at line 15)\n
 ponNullOrNonNull.hashCode(); // ERROR 2: pot null, but nothing reported\n
 ^^^^^^^^^^^^^^^^\n
Potential null pointer access: The variable ponNullOrNonNull may be null at this location\n
----------\n
3. ERROR in test\PotNullInLoop.java (at line 27)\n
 potNull.hashCode(); // ERROR 3 : pot null, but nothing reported\n
 ^^^^^^^\n
Null pointer access: The variable potNull can only be null at this location\n
----------\n
4. ERROR in test\PotNullInLoop.java (at line 28)\n
 ponNullOrNonNull.hashCode(); // ERROR 4: pot null, but nothing reported\n
 ^^^^^^^^^^^^^^^^\n
Potential null pointer access: The variable ponNullOrNonNull may be null at this location\n
----------\n
5. ERROR in test\PotNullInLoop.java (at line 41)\n
 potNull.hashCode(); // OK: pot null, is reported\n
 ^^^^^^^\n
Null pointer access: The variable potNull can only be null at this location\n
----------\n
6. ERROR in test\PotNullInLoop.java (at line 42)\n
 ponNullOrNonNull.hashCode(); // OK: pot null, is reported\n
 ^^^^^^^^^^^^^^^^\n
Potential null pointer access: The variable ponNullOrNonNull may be null at this location\n
----------\n
7. ERROR in test\PotNullInLoop.java (at line 54)\n
 potNull.hashCode(); // OK: pot null, is reported\n
 ^^^^^^^\n
Null pointer access: The variable potNull can only be null at this location\n
----------\n
8. ERROR in test\PotNullInLoop.java (at line 55)\n
 ponNullOrNonNull.hashCode(); // OK: pot null, is reported\n
 ^^^^^^^^^^^^^^^^\n
Potential null pointer access: The variable ponNullOrNonNull may be null at this location\n
----------\n
9. ERROR in test\PotNullInLoop.java (at line 67)\n
 potNull.hashCode(); // OK: pot null, is reported\n
 ^^^^^^^\n
Null pointer access: The variable potNull can only be null at this location\n
----------\n
10. ERROR in test\PotNullInLoop.java (at line 68)\n
 ponNullOrNonNull.hashCode(); // OK: pot null, is reported\n
 ^^^^^^^^^^^^^^^^\n
Potential null pointer access: The variable ponNullOrNonNull may be null at this location\n
----------\n

--------- Difference is ----------
 expected:<[]> but was:<[----------\n
1. ERROR in test\PotNullInLoop.java (at line 14)\n
 potNull.hashCode(); // ERROR 1: pot null, but nothing reported\n
 ^^^^^^^\n
Null pointer access: The variable potNull can only be null at this location\n
----------\n
2. ERROR in test\PotNullInLoop.java (at line 15)\n
 ponNullOrNonNull.hashCode(); // ERROR 2: pot null, but nothing reported\n
 ^^^^^^^^^^^^^^^^\n
Potential null pointer access: The variable ponNullOrNonNull may be null at this location\n
----------\n
3. ERROR in test\PotNullInLoop.java (at line 27)\n
 potNull.hashCode(); // ERROR 3 : pot null, but nothing reported\n
 ^^^^^^^\n
Null pointer access: The variable potNull can only be null at this location\n
----------\n
4. ERROR in test\PotNullInLoop.java (at line 28)\n
 ponNullOrNonNull.hashCode(); // ERROR 4: pot null, but nothing reported\n
 ^^^^^^^^^^^^^^^^\n
Potential null pointer access: The variable ponNullOrNonNull may be null at this location\n
----------\n
5. ERROR in test\PotNullInLoop.java (at line 41)\n
 potNull.hashCode(); // OK: pot null, is reported\n
 ^^^^^^^\n
Null pointer access: The variable potNull can only be null at this location\n
----------\n
6. ERROR in test\PotNullInLoop.java (at line 42)\n
 ponNullOrNonNull.hashCode(); // OK: pot null, is reported\n
 ^^^^^^^^^^^^^^^^\n
Potential null pointer access: The variable ponNullOrNonNull may be null at this location\n
----------\n
7. ERROR in test\PotNullInLoop.java (at line 54)\n
 potNull.hashCode(); // OK: pot null, is reported\n
 ^^^^^^^\n
Null pointer access: The variable potNull can only be null at this location\n
----------\n
8. ERROR in test\PotNullInLoop.java (at line 55)\n
 ponNullOrNonNull.hashCode(); // OK: pot null, is reported\n
 ^^^^^^^^^^^^^^^^\n
Potential null pointer access: The variable ponNullOrNonNull may be null at this location\n
----------\n
9. ERROR in test\PotNullInLoop.java (at line 67)\n
 potNull.hashCode(); // OK: pot null, is reported\n
 ^^^^^^^\n
Null pointer access: The variable potNull can only be null at this location\n
----------\n
10. ERROR in test\PotNullInLoop.java (at line 68)\n
 ponNullOrNonNull.hashCode(); // OK: pot null, is reported\n
 ^^^^^^^^^^^^^^^^\n
Potential null pointer access: The variable ponNullOrNonNull may be null at this location\n
----------\n
]>

Stacktrace

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

------------ but was ------------
----------\n
1. ERROR in test\PotNullInLoop.java (at line 14)\n
	potNull.hashCode(); // ERROR 1: pot null, but nothing reported\n
	^^^^^^^\n
Null pointer access: The variable potNull can only be null at this location\n
----------\n
2. ERROR in test\PotNullInLoop.java (at line 15)\n
	ponNullOrNonNull.hashCode(); // ERROR 2: pot null, but nothing reported\n
	^^^^^^^^^^^^^^^^\n
Potential null pointer access: The variable ponNullOrNonNull may be null at this location\n
----------\n
3. ERROR in test\PotNullInLoop.java (at line 27)\n
	potNull.hashCode(); // ERROR 3 : pot null, but nothing reported\n
	^^^^^^^\n
Null pointer access: The variable potNull can only be null at this location\n
----------\n
4. ERROR in test\PotNullInLoop.java (at line 28)\n
	ponNullOrNonNull.hashCode(); // ERROR 4: pot null, but nothing reported\n
	^^^^^^^^^^^^^^^^\n
Potential null pointer access: The variable ponNullOrNonNull may be null at this location\n
----------\n
5. ERROR in test\PotNullInLoop.java (at line 41)\n
	potNull.hashCode(); // OK: pot null, is reported\n
	^^^^^^^\n
Null pointer access: The variable potNull can only be null at this location\n
----------\n
6. ERROR in test\PotNullInLoop.java (at line 42)\n
	ponNullOrNonNull.hashCode(); // OK: pot null, is reported\n
	^^^^^^^^^^^^^^^^\n
Potential null pointer access: The variable ponNullOrNonNull may be null at this location\n
----------\n
7. ERROR in test\PotNullInLoop.java (at line 54)\n
	potNull.hashCode(); // OK: pot null, is reported\n
	^^^^^^^\n
Null pointer access: The variable potNull can only be null at this location\n
----------\n
8. ERROR in test\PotNullInLoop.java (at line 55)\n
	ponNullOrNonNull.hashCode(); // OK: pot null, is reported\n
	^^^^^^^^^^^^^^^^\n
Potential null pointer access: The variable ponNullOrNonNull may be null at this location\n
----------\n
9. ERROR in test\PotNullInLoop.java (at line 67)\n
	potNull.hashCode(); // OK: pot null, is reported\n
	^^^^^^^\n
Null pointer access: The variable potNull can only be null at this location\n
----------\n
10. ERROR in test\PotNullInLoop.java (at line 68)\n
	ponNullOrNonNull.hashCode(); // OK: pot null, is reported\n
	^^^^^^^^^^^^^^^^\n
Potential null pointer access: The variable ponNullOrNonNull may be null at this location\n
----------\n

--------- Difference is ----------
 expected:<[]> but was:<[----------\n
1. ERROR in test\PotNullInLoop.java (at line 14)\n
	potNull.hashCode(); // ERROR 1: pot null, but nothing reported\n
	^^^^^^^\n
Null pointer access: The variable potNull can only be null at this location\n
----------\n
2. ERROR in test\PotNullInLoop.java (at line 15)\n
	ponNullOrNonNull.hashCode(); // ERROR 2: pot null, but nothing reported\n
	^^^^^^^^^^^^^^^^\n
Potential null pointer access: The variable ponNullOrNonNull may be null at this location\n
----------\n
3. ERROR in test\PotNullInLoop.java (at line 27)\n
	potNull.hashCode(); // ERROR 3 : pot null, but nothing reported\n
	^^^^^^^\n
Null pointer access: The variable potNull can only be null at this location\n
----------\n
4. ERROR in test\PotNullInLoop.java (at line 28)\n
	ponNullOrNonNull.hashCode(); // ERROR 4: pot null, but nothing reported\n
	^^^^^^^^^^^^^^^^\n
Potential null pointer access: The variable ponNullOrNonNull may be null at this location\n
----------\n
5. ERROR in test\PotNullInLoop.java (at line 41)\n
	potNull.hashCode(); // OK: pot null, is reported\n
	^^^^^^^\n
Null pointer access: The variable potNull can only be null at this location\n
----------\n
6. ERROR in test\PotNullInLoop.java (at line 42)\n
	ponNullOrNonNull.hashCode(); // OK: pot null, is reported\n
	^^^^^^^^^^^^^^^^\n
Potential null pointer access: The variable ponNullOrNonNull may be null at this location\n
----------\n
7. ERROR in test\PotNullInLoop.java (at line 54)\n
	potNull.hashCode(); // OK: pot null, is reported\n
	^^^^^^^\n
Null pointer access: The variable potNull can only be null at this location\n
----------\n
8. ERROR in test\PotNullInLoop.java (at line 55)\n
	ponNullOrNonNull.hashCode(); // OK: pot null, is reported\n
	^^^^^^^^^^^^^^^^\n
Potential null pointer access: The variable ponNullOrNonNull may be null at this location\n
----------\n
9. ERROR in test\PotNullInLoop.java (at line 67)\n
	potNull.hashCode(); // OK: pot null, is reported\n
	^^^^^^^\n
Null pointer access: The variable potNull can only be null at this location\n
----------\n
10. ERROR in test\PotNullInLoop.java (at line 68)\n
	ponNullOrNonNull.hashCode(); // OK: pot null, is reported\n
	^^^^^^^^^^^^^^^^\n
Potential null pointer access: The variable ponNullOrNonNull may be null at this location\n
----------\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:2044)
	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.testBug486912PotNullInLoop_orig(NullReferenceTest.java:17750)

Standard Output

org.eclipse.jdt.core.tests.compiler.regression.NullReferenceTest#testBug486912PotNullInLoop_orig - 1.8
test/PotNullInLoop.java [
package test;

public class PotNullInLoop {
	boolean b;

	public void testDoWhile1() {
		Object o1 = null;
		Object o2 = new Object();
		Object potNonNull = b ? o2 : o2;
		Object potNull = b ? o1 : o1;
		Object ponNullOrNonNull = b ? potNull : potNonNull;
		do {
			potNonNull.hashCode(); // OK
			potNull.hashCode(); // ERROR 1: pot null, but nothing reported
			ponNullOrNonNull.hashCode(); // ERROR 2: pot null, but nothing reported
		} while (false);
	}

	public void testWhileWithBreak() {
		Object o1 = null;
		Object o2 = new Object();
		Object potNonNull = b ? o2 : o2;
		Object potNull = b ? o1 : o1;
		Object ponNullOrNonNull = b ? potNull : potNonNull;
		while (b) {
			potNonNull.hashCode(); // OK
			potNull.hashCode(); // ERROR 3 : pot null, but nothing reported
			ponNullOrNonNull.hashCode(); // ERROR 4: pot null, but nothing reported
			break;
		}
	}

	public void testWhile() {
		Object o1 = null;
		Object o2 = new Object();
		Object potNonNull = b ? o2 : o2;
		Object potNull = b ? o1 : o1;
		Object ponNullOrNonNull = b ? potNull : potNonNull;
		while (b) {
			potNonNull.hashCode(); // OK
			potNull.hashCode(); // OK: pot null, is reported
			ponNullOrNonNull.hashCode(); // OK: pot null, is reported
		}
	}

	public void testFor() {
		Object o1 = null;
		Object o2 = new Object();
		Object potNonNull = b ? o2 : o2;
		Object potNull = b ? o1 : o1;
		Object ponNullOrNonNull = b ? potNull : potNonNull;
		for (int i = 0; i < 1; i++) {
			potNonNull.hashCode(); // OK
			potNull.hashCode(); // OK: pot null, is reported
			ponNullOrNonNull.hashCode(); // OK: pot null, is reported
		}
	}

	public void testForEach() {
		Object o1 = null;
		Object o2 = new Object();
		Object potNonNull = b ? o2 : o2;
		Object potNull = b ? o1 : o1;
		Object ponNullOrNonNull = b ? potNull : potNonNull;
		for (int i = 0; i < 1; i++) {
			potNonNull.hashCode(); // OK
			potNull.hashCode(); // OK: pot null, is reported
			ponNullOrNonNull.hashCode(); // OK: pot null, is reported
		}
	}

}

]


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

Standard Error

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