You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2022/06/15 11:55:57 UTC

[GitHub] [iceberg] nastra commented on a diff in pull request #5047: Nessie: Properly close all resources in NessieCatalog

nastra commented on code in PR #5047:
URL: https://github.com/apache/iceberg/pull/5047#discussion_r897887618


##########
nessie/src/main/java/org/apache/iceberg/nessie/NessieCatalog.java:
##########
@@ -151,8 +158,10 @@ private static NessieClientBuilder<?> createNessieClientBuilder(String customBui
   }
 
   @Override
-  public void close() {
-    client.close();
+  public void close() throws IOException {
+    if (null != closeableGroup) {

Review Comment:
   I know others don't have it but I feel that we could potentially still run into a case where `closeableGroup` hasn't been initialized because some preivous code in `initialize(...)` failed and if `close()` is called at some place, then it would throw a NPE



-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org