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


##########
clients/cli/src/main/java/org/apache/gravitino/cli/GravitinoCommandLine.java:
##########
@@ -762,6 +775,12 @@ protected void handleRoleCommand() {
     }
   }
 
+  private String getOneRole(String[] roles, String command) {
+    Preconditions.checkArgument(
+        roles.length == 1, command + " requires only one role, but multiple 
are currently passed.");

Review Comment:
   My question about this line of code is whether it is user-friendly. i.e. 
what error is displayed and in what form to the user if this precondition 
fails? If it shows an exception, we should fix that. I'm also unsure why a 
precondition is used here and not elsewhere to check CLI arguments.



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