manifoldcf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cihad Guzel (JIRA)" <>
Subject [jira] [Created] (CONNECTORS-1590) Resources should be closed in a finally block
Date Sun, 03 Mar 2019 11:24:00 GMT
Cihad Guzel created CONNECTORS-1590:

             Summary: Resources should be closed in a finally block
                 Key: CONNECTORS-1590
             Project: ManifoldCF
          Issue Type: Bug
          Components: Framework core
    Affects Versions: ManifoldCF 2.12
            Reporter: Cihad Guzel
             Fix For: ManifoldCF 2.13

public class DBInterfaceHSQLDB extends Database implements IDBInterface {
        Connection c = DriverManager.getConnection(_localUrl+databaseName,userName,password);
        Statement s = c.createStatement();
      catch (Exception e)
        // Never any exception!
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.

This message was sent by Atlassian JIRA

View raw message