justinmclean commented on code in PR #5857:
URL: https://github.com/apache/gravitino/pull/5857#discussion_r1885993061
##########
clients/cli/src/main/java/org/apache/gravitino/cli/commands/CreateTag.java:
##########
@@ -52,11 +52,17 @@ public CreateTag(
/** Create tags. */
@Override
public void handle() {
- boolean hasOnlyOneTag = tags.length == 1;
- if (hasOnlyOneTag) {
- handleOnlyOneTag();
- } else {
- handleMultipleTags();
+ int tagCount = (tags != null ? tags.length : 0);
+ switch (tagCount) {
+ case 0:
+ System.err.println(ErrorMessages.TAG_EMPTY);
+ break;
+ case 1:
+ handleOnlyOneTag();
+ break;
+ default:
+ handleMultipleTags();
+ break;
Review Comment:
As these are just tests you can add this to them
`@SuppressWarnings("DefaultCharset")`
--
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]