yuqi1129 commented on code in PR #6367:
URL: https://github.com/apache/gravitino/pull/6367#discussion_r1929676534


##########
core/src/main/java/org/apache/gravitino/authorization/AuthorizationUtils.java:
##########
@@ -472,19 +481,20 @@ public static List<String> getMetadataObjectLocation(
                     .catalogDispatcher()
                     .loadCatalog(
                         NameIdentifier.of(ident.namespace().level(0), 
ident.namespace().level(1)));
-            LOG.info("Catalog provider is %s", catalogObj.provider());
-            if (catalogObj.provider().equals("hive")) {
+            LOG.info("Catalog provider is {}", catalogObj.provider());
+            String catalogProvider = catalogObj.provider();
+            if (Objects.equals(catalogProvider, "hive")
+                || Objects.equals(catalogProvider, "hadoop")) {

Review Comment:
   It's easy to get NPE for a new starter like stringVariable.equals("value") 
if `stringVariable` is a null value. 



##########
core/src/main/java/org/apache/gravitino/authorization/AuthorizationUtils.java:
##########
@@ -462,6 +464,13 @@ public static List<String> getMetadataObjectLocation(
               if (defaultSchemaLocation != null && 
!defaultSchemaLocation.isEmpty()) {

Review Comment:
   Sure



-- 
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: commits-unsubscr...@gravitino.apache.org

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

Reply via email to