flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Yao (Jira)" <j...@apache.org>
Subject [jira] [Updated] (FLINK-14075) Remove unnecessary resource close in JDBCOutputFormatTest.java
Date Thu, 16 Jan 2020 16:10:00 GMT

     [ https://issues.apache.org/jira/browse/FLINK-14075?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Gary Yao updated FLINK-14075:
-----------------------------
    Fix Version/s:     (was: 1.10.0)

> Remove unnecessary resource close in JDBCOutputFormatTest.java
> --------------------------------------------------------------
>
>                 Key: FLINK-14075
>                 URL: https://issues.apache.org/jira/browse/FLINK-14075
>             Project: Flink
>          Issue Type: Improvement
>          Components: Connectors / JDBC
>            Reporter: Canbin Zheng
>            Priority: Minor
>
>  
> {code:java}
> public void clearOutputTable() throws Exception {
>    Class.forName(DRIVER_CLASS);
>    try (
>       Connection conn = DriverManager.getConnection(DB_URL);
>       Statement stat = conn.createStatement()) {
>       stat.execute("DELETE FROM " + OUTPUT_TABLE);
>       stat.close();
>       conn.close();
>    }
> }{code}
> Unnecessary close of stat and conn can be removed.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message