Failed
org.eclipse.jdt.core.tests.compiler.regression.NullReferenceTest.testBug447695g - 1.8 (from org.eclipse.jdt.core.tests.compiler.regression.TestAll)
Error Message
testBug447695g - Eclipse found error(s) but Javac did not find any. ----------- Expected ------------ ------------ but was ------------ ----------\n 1. ERROR in test\Test447695.java (at line 20)\n x1.i = 1; // error 1 expected\n ^^\n Null pointer access: The variable x1 can only be null at this location\n ----------\n 2. ERROR in test\Test447695.java (at line 21)\n x2.i += 1; // error 2 expected\n ^^\n Null pointer access: The variable x2 can only be null at this location\n ----------\n 3. ERROR in test\Test447695.java (at line 22)\n (x3).i = 1; // error 3 expected\n ^^^^\n Null pointer access: The variable x3 can only be null at this location\n ----------\n 4. ERROR in test\Test447695.java (at line 23)\n (x4).i += 1; // error 4 expected\n ^^^^\n Null pointer access: The variable x4 can only be null at this location\n ----------\n 5. ERROR in test\Test447695.java (at line 26)\n int i1 = x9.i; // error 5 expected\n ^^\n Null pointer access: The variable x9 can only be null at this location\n ----------\n 6. ERROR in test\Test447695.java (at line 27)\n int i2 = (x10).i; // error 6 expected\n ^^^^^\n Null pointer access: The variable x10 can only be null at this location\n ----------\n --------- Difference is ---------- expected:<[]> but was:<[----------\n 1. ERROR in test\Test447695.java (at line 20)\n x1.i = 1; // error 1 expected\n ^^\n Null pointer access: The variable x1 can only be null at this location\n ----------\n 2. ERROR in test\Test447695.java (at line 21)\n x2.i += 1; // error 2 expected\n ^^\n Null pointer access: The variable x2 can only be null at this location\n ----------\n 3. ERROR in test\Test447695.java (at line 22)\n (x3).i = 1; // error 3 expected\n ^^^^\n Null pointer access: The variable x3 can only be null at this location\n ----------\n 4. ERROR in test\Test447695.java (at line 23)\n (x4).i += 1; // error 4 expected\n ^^^^\n Null pointer access: The variable x4 can only be null at this location\n ----------\n 5. ERROR in test\Test447695.java (at line 26)\n int i1 = x9.i; // error 5 expected\n ^^\n Null pointer access: The variable x9 can only be null at this location\n ----------\n 6. ERROR in test\Test447695.java (at line 27)\n int i2 = (x10).i; // error 6 expected\n ^^^^^\n Null pointer access: The variable x10 can only be null at this location\n ----------\n ]>
Stacktrace
junit.framework.ComparisonFailure: testBug447695g - Eclipse found error(s) but Javac did not find any. ----------- Expected ------------ ------------ but was ------------ ----------\n 1. ERROR in test\Test447695.java (at line 20)\n x1.i = 1; // error 1 expected\n ^^\n Null pointer access: The variable x1 can only be null at this location\n ----------\n 2. ERROR in test\Test447695.java (at line 21)\n x2.i += 1; // error 2 expected\n ^^\n Null pointer access: The variable x2 can only be null at this location\n ----------\n 3. ERROR in test\Test447695.java (at line 22)\n (x3).i = 1; // error 3 expected\n ^^^^\n Null pointer access: The variable x3 can only be null at this location\n ----------\n 4. ERROR in test\Test447695.java (at line 23)\n (x4).i += 1; // error 4 expected\n ^^^^\n Null pointer access: The variable x4 can only be null at this location\n ----------\n 5. ERROR in test\Test447695.java (at line 26)\n int i1 = x9.i; // error 5 expected\n ^^\n Null pointer access: The variable x9 can only be null at this location\n ----------\n 6. ERROR in test\Test447695.java (at line 27)\n int i2 = (x10).i; // error 6 expected\n ^^^^^\n Null pointer access: The variable x10 can only be null at this location\n ----------\n --------- Difference is ---------- expected:<[]> but was:<[----------\n 1. ERROR in test\Test447695.java (at line 20)\n x1.i = 1; // error 1 expected\n ^^\n Null pointer access: The variable x1 can only be null at this location\n ----------\n 2. ERROR in test\Test447695.java (at line 21)\n x2.i += 1; // error 2 expected\n ^^\n Null pointer access: The variable x2 can only be null at this location\n ----------\n 3. ERROR in test\Test447695.java (at line 22)\n (x3).i = 1; // error 3 expected\n ^^^^\n Null pointer access: The variable x3 can only be null at this location\n ----------\n 4. ERROR in test\Test447695.java (at line 23)\n (x4).i += 1; // error 4 expected\n ^^^^\n Null pointer access: The variable x4 can only be null at this location\n ----------\n 5. ERROR in test\Test447695.java (at line 26)\n int i1 = x9.i; // error 5 expected\n ^^\n Null pointer access: The variable x9 can only be null at this location\n ----------\n 6. ERROR in test\Test447695.java (at line 27)\n int i2 = (x10).i; // error 6 expected\n ^^^^^\n Null pointer access: The variable x10 can only 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.testBug447695g(NullReferenceTest.java:18087)
Standard Output
org.eclipse.jdt.core.tests.compiler.regression.NullReferenceTest#testBug447695g - 1.8 test/Test447695.java [ package test; class X { int i; } public class Test447695 { void f() { X x1 = null; X x2 = null; X x3 = null; X x4 = null; X x5 = null; X x6 = null; X x7 = null; X x8 = null; X x9 = null; X x10 = null; X x11 = null; x1.i = 1; // error 1 expected x2.i += 1; // error 2 expected (x3).i = 1; // error 3 expected (x4).i += 1; // error 4 expected (x5 = new X()).i = (x6 = new X()).i; (x7 = new X()).i += (x8 = new X()).i; int i1 = x9.i; // error 5 expected int i2 = (x10).i; // error 6 expected int i3 = (x11 = new X()).i; } } ] Full results sent to /tmp/comptest/run.1514610271420/1.8.0_131_20171230_000432.txt
Standard Error
----------------------------------------