justinmclean commented on code in PR #6573:
URL: https://github.com/apache/gravitino/pull/6573#discussion_r1976543674


##########
clients/cli/src/main/java/org/apache/gravitino/cli/commands/CatalogAudit.java:
##########
@@ -53,20 +53,15 @@ public void handle() {
       result = client.loadCatalog(this.catalog);
     } catch (NoSuchMetalakeException err) {
       exitWithError(ErrorMessages.UNKNOWN_METALAKE);
-      return; // Stop execution after handling error
     } catch (NoSuchCatalogException err) {
       exitWithError(ErrorMessages.UNKNOWN_CATALOG);
-      return; // Stop execution after handling error
     } catch (Exception exp) {
       exitWithError(exp.getMessage());
-      return; // Stop execution after handling error
     }
 
-    // **Null check before accessing auditInfo()**
-    if (result != null && result.auditInfo() != null) {
+    // Only check if result is null

Review Comment:
   Please remove this comment, there is no need for comments that explain 
simple code. They don't really add anything and at worse get out of sync with 
the code and end up causing confusion. See for instance 
https://stackoverflow.blog/2021/12/23/best-practices-for-writing-code-comments/



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