Failed

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

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

Error Message

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

------------ but was ------------
----------\n
1. ERROR in Bug381445.java (at line 8)\n
 ResultSet rset2 = stat.executeQuery(q2);\n
           ^^^^^\n
Potential resource leak: 'rset2' may not be closed\n
----------\n

--------- Difference is ----------
 expected:<[]> but was:<[----------\n
1. ERROR in Bug381445.java (at line 8)\n
 ResultSet rset2 = stat.executeQuery(q2);\n
           ^^^^^\n
Potential resource leak: 'rset2' may not be closed\n
----------\n
]>

Stacktrace

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

------------ but was ------------
----------\n
1. ERROR in Bug381445.java (at line 8)\n
	ResultSet rset2 = stat.executeQuery(q2);\n
	          ^^^^^\n
Potential resource leak: 'rset2' may not be closed\n
----------\n

--------- Difference is ----------
 expected:<[]> but was:<[----------\n
1. ERROR in Bug381445.java (at line 8)\n
	ResultSet rset2 = stat.executeQuery(q2);\n
	          ^^^^^\n
Potential resource leak: 'rset2' may not be closed\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:2301)
	at org.eclipse.jdt.core.tests.compiler.regression.AbstractRegressionTest.runNegativeTest(AbstractRegressionTest.java:2289)
	at org.eclipse.jdt.core.tests.compiler.regression.ResourceLeakTests.testBug381445_1b(ResourceLeakTests.java:4104)

Standard Output

org.eclipse.jdt.core.tests.compiler.regression.ResourceLeakTests#testBug381445_1b - 1.8
org/apache/commons/dbutils/DbUtils.java [
package org.apache.commons.dbutils;
import java.sql.*;
public class DbUtils {
    public static void close(Connection connection) {}
    public static void close(ResultSet resultSet) {}
    public static void close(Statement statement) {}
    public static void closeQuietly(Connection connection) {}
    public static void closeQuietly(ResultSet resultSet) {}
    public static void closeQuietly(Statement statement) {}
    public static void closeQuietly(Connection conn, Statement stmt, ResultSet rs) {}
}

]
Bug381445.java [
import java.sql.*;

public class Bug381445 {
	public void performQuery1(String url, String q1, String q2) throws Exception {
		Connection conn = DriverManager.getConnection(url);
		Statement stat = conn.createStatement();
		ResultSet rset = stat.executeQuery(q1);
		ResultSet rset2 = stat.executeQuery(q2);
		try {
			// empty
		} finally {
			org.apache.commons.dbutils.DbUtils.closeQuietly(conn);
			org.apache.commons.dbutils.DbUtils.close(stat);
			org.apache.commons.dbutils.DbUtils.closeQuietly(rset);
			Closeables.closeQuietly(rset2);
		}
	}
	public void performQuery2(String url, String q1, String q2) throws Exception {
		Connection conn = DriverManager.getConnection(url);
		Statement stat = conn.createStatement();
		ResultSet rset = stat.executeQuery(q1);
		try {
			// empty
		} finally {
			org.apache.commons.dbutils.DbUtils.closeQuietly(conn, stat, rset);
		}
	}
}
class Closeables {
	public static void closeQuietly(java.lang.AutoCloseable closeable) {}
}

]


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

Standard Error

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