Failed

org.eclipse.jdt.core.tests.compiler.regression.ResourceLeakTests.test063d - 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

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

------------ but was ------------
----------\n
1. ERROR in X.java (at line 12)\n
 InputStream input = new FileInputStream("somefile");\n
             ^^^^^\n
Resource 'input' should be managed by try-with-resource\n
----------\n

--------- Difference is ----------
 expected:<[]> but was:<[----------\n
1. ERROR in X.java (at line 12)\n
 InputStream input = new FileInputStream("somefile");\n
             ^^^^^\n
Resource 'input' should be managed by try-with-resource\n
----------\n
]>

Stacktrace

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

------------ but was ------------
----------\n
1. ERROR in X.java (at line 12)\n
	InputStream input = new FileInputStream("somefile");\n
	            ^^^^^\n
Resource 'input' should be managed by try-with-resource\n
----------\n

--------- Difference is ----------
 expected:<[]> but was:<[----------\n
1. ERROR in X.java (at line 12)\n
	InputStream input = new FileInputStream("somefile");\n
	            ^^^^^\n
Resource 'input' should be managed by try-with-resource\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:2220)
	at org.eclipse.jdt.core.tests.compiler.regression.ResourceLeakTests.runTestsExpectingErrorsOnlyIn17(ResourceLeakTests.java:66)
	at org.eclipse.jdt.core.tests.compiler.regression.ResourceLeakTests.test063d(ResourceLeakTests.java:3050)

Standard Output

org.eclipse.jdt.core.tests.compiler.regression.ResourceLeakTests#test063d - 1.8
X.java [
import java.io.FileInputStream;
import java.io.BufferedInputStream;
import java.io.InputStream;
import java.io.IOException;
public class X {
    void foo( InputStream input) throws IOException {
        FileInputStream input1  = (FileInputStream)input;
        System.out.println(input1.read());
        input.close();
    }
    void foo() throws IOException {
        InputStream input = new FileInputStream("somefile");
        FileInputStream input1  = (FileInputStream)input;
        System.out.println(input1.read());
        input.close();
    }
    void foo3( InputStream input, InputStream input2) throws IOException {
        FileInputStream input1  = (FileInputStream)input;
        System.out.println(input1.read());
        BufferedInputStream bis = new BufferedInputStream(input2);
        System.out.println(bis.read());
    }
}

]


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

Standard Error

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