justinmclean commented on code in PR #6573:
URL: https://github.com/apache/gravitino/pull/6573#discussion_r1976543782
##########
clients/cli/src/main/java/org/apache/gravitino/cli/commands/ListCatalogProperties.java:
##########
@@ -49,31 +48,19 @@ public ListCatalogProperties(CommandContext context, String
metalake, String cat
/** List the properties of a catalog. */
@Override
public void handle() {
- Catalog gCatalog = null;
+ try {
+ GravitinoClient client = buildClient(metalake);
+ Catalog gCatalog = client.loadCatalog(catalog);
- try (GravitinoClient client = buildClient(metalake)) { // Ensures client
is closed
- gCatalog = client.loadCatalog(catalog);
+ if (gCatalog != null) {
+ printProperties(gCatalog.properties());
+ }
Review Comment:
Please move this out of the try block, adding it here makes it unclear what
call throws what exception.
--
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]