Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Won't Fix
-
ManifoldCF 2.12
-
None
Description
public class DBInterfaceHSQLDB extends Database implements IDBInterface { ... try { Connection c = DriverManager.getConnection(_localUrl+databaseName,userName,password); Statement s = c.createStatement(); s.execute("SHUTDOWN"); c.close(); } catch (Exception e) { // Never any exception! e.printStackTrace(); }
Connections that implement the Closeable interface or its super-interface, AutoCloseable, needs to be closed after use. That close call must be made in a finally block otherwise an exception could keep the call from being made.