Failed

org.eclipse.jdt.core.tests.compiler.regression.ResourceLeakTests.testBug368709a - 1.8 (from org.eclipse.jdt.core.tests.compiler.regression.TestAll)

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

Error Message

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

------------ but was ------------
----------\n
1. ERROR in X.java (at line 18)\n
 return new ObjectStream.Filter(type, size, in);\n
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n
Potential resource leak: 'in' may not be closed at this location\n
----------\n

--------- Difference is ----------
 expected:<[]> but was:<[----------\n
1. ERROR in X.java (at line 18)\n
 return new ObjectStream.Filter(type, size, in);\n
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n
Potential resource leak: 'in' may not be closed at this location\n
----------\n
]>

Stacktrace

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

------------ but was ------------
----------\n
1. ERROR in X.java (at line 18)\n
	return new ObjectStream.Filter(type, size, in);\n
	^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n
Potential resource leak: 'in' may not be closed at this location\n
----------\n

--------- Difference is ----------
 expected:<[]> but was:<[----------\n
1. ERROR in X.java (at line 18)\n
	return new ObjectStream.Filter(type, size, in);\n
	^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n
Potential resource leak: 'in' may not be closed 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:2220)
	at org.eclipse.jdt.core.tests.compiler.regression.ResourceLeakTests.testBug368709a(ResourceLeakTests.java:3119)

Standard Output

org.eclipse.jdt.core.tests.compiler.regression.ResourceLeakTests#testBug368709a - 1.8
X.java [
import java.io.*;
import java.util.zip.*;
public class X {
  Object db, pack;
  int objectOffset, headerLength, type, size;
  public ObjectStream openStream() throws MissingObjectException, IOException {
    WindowCursor wc = new WindowCursor(db);
    InputStream in;
    try
      {
        in = new PackInputStream(pack, (objectOffset + headerLength), wc);
      }
    catch (IOException packGone)
      {
        return wc.open(getObjectId(), type).openStream();
      }
    in = new BufferedInputStream(new InflaterInputStream(in, wc.inflater(), 8192), 8192);
    return new ObjectStream.Filter(type, size, in);
  }
  String getObjectId() { return ""; }
}
class WindowCursor {
    WindowCursor(Object db) {}
    ObjectStream open(String id, int type) { return null; }
    Inflater inflater() { return null; }
}
class MissingObjectException extends Exception {
    public static final long serialVersionUID = 13L;
    MissingObjectException() { super();}
}
class PackInputStream extends InputStream {
    PackInputStream(Object pack, int offset, WindowCursor wc) throws IOException {}
    public int read() { return 0; }
}
class ObjectStream extends InputStream {
    static class Filter extends ObjectStream {
        Filter(int type, int size, InputStream in) { }
    }
    ObjectStream openStream() { return this; }
    public int read() { return 0; }
}

]


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

Standard Error

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