leosanqing commented on code in PR #5280:
URL: https://github.com/apache/inlong/pull/5280#discussion_r933978407


##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/resource/sink/oracle/OracleJdbcUtils.java:
##########
@@ -145,19 +146,20 @@ public static void createTable(Connection conn, 
OracleTableInfo tableInfo)
      * @return true if table exist, otherwise false
      * @throws Exception on check table exist error
      */
-    public static boolean checkTablesExist(Connection conn, String userName, 
String tableName)
-            throws Exception {
+    public static boolean checkTablesExist(Connection conn, String userName, 
String tableName) throws Exception {
         boolean result = false;
         String checkTableSql = OracleSqlBuilder.getCheckTable(userName, 
tableName);
         ResultSet resultSet = executeQuerySql(conn, checkTableSql);
         if (null != resultSet && resultSet.next()) {
             int size = resultSet.getInt(1);
             if (size > 0) {
-                LOG.info("check table exist for username={} table={}, 
result={}", userName, tableName, result);
-                return true;
+                result = true;
             }
         }
-        resultSet.close();
+        LOG.info("check table exist for username={} table={}, result={}", 
userName, tableName, result);
+        if (Objects.nonNull(resultSet)) {
+            resultSet.close();

Review Comment:
   same as above



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to