You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by "Ted Yu (JIRA)" <ji...@apache.org> on 2016/09/25 02:40:21 UTC
[jira] [Created] (KYLIN-2050) Potentially ineffective call to
close() in QueryCli
Ted Yu created KYLIN-2050:
-----------------------------
Summary: Potentially ineffective call to close() in QueryCli
Key: KYLIN-2050
URL: https://issues.apache.org/jira/browse/KYLIN-2050
Project: Kylin
Issue Type: Bug
Reporter: Ted Yu
Priority: Minor
Here is related code:
{code}
} finally {
if (rs != null) {
rs.close();
}
if (stmt != null) {
stmt.close();
}
if (conn != null) {
conn.close();
}
}
{code}
If the first or second close() throws exception, the subsequent close() would be skipped.
This pattern may appear in other class(es).
See http://stackoverflow.com/questions/2225221/closing-database-connections-in-java
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)