guoyuepeng commented on a change in pull request #506: add hive metadata jdbc 
retrieval
URL: https://github.com/apache/griffin/pull/506#discussion_r304187850
 
 

 ##########
 File path: 
service/src/main/java/org/apache/griffin/core/metastore/hive/HiveMetaStoreServiceJdbcImpl.java
 ##########
 @@ -160,6 +143,22 @@ public void evictHiveCache() {
         LOGGER.info("Evict hive cache");
     }
 
+    private void closeConnection(Connection conn, Statement stmt, ResultSet 
rs) {
+        try {
+            if (rs != null) {
 
 Review comment:
   I see these three resources are AutoCloseable. please use try-with-resource. 
don't need to close them in finally block.
   
https://docs.oracle.com/javase/tutorial/essential/exceptions/tryResourceClose.html

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to