healchow commented on code in PR #6077: URL: https://github.com/apache/inlong/pull/6077#discussion_r984340515
########## inlong-audit/audit-store/src/main/java/org/apache/inlong/audit/service/ClickHouseService.java: ########## @@ -99,10 +99,13 @@ private void processOutput() { return; } // output - try (PreparedStatement pstat = this.conn.prepareStatement(INSERT_SQL)) { Review Comment: Suggested using the `try-with-resource`, because the `PreparedStatement` implements the `AutoCloseable` interface, it will be closed automatically, we don't need to write additional `finally` block to close it. ########## inlong-audit/audit-store/src/main/java/org/apache/inlong/audit/service/ClickHouseService.java: ########## @@ -99,10 +99,13 @@ private void processOutput() { return; } // output - try (PreparedStatement pstat = this.conn.prepareStatement(INSERT_SQL)) { Review Comment: Suggested using the `try-with-resource`, because the `PreparedStatement` implements the `AutoCloseable` interface, it will be closed automatically, we don't need to write an additional `finally` block to close it. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@inlong.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org