You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Gary Yao (Jira)" <ji...@apache.org> on 2020/01/16 16:10:00 UTC

[jira] [Updated] (FLINK-14075) Remove unnecessary resource close in JDBCOutputFormatTest.java

     [ 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)