roryqi commented on code in PR #12384:
URL: https://github.com/apache/gravitino/pull/12384#discussion_r3726846586


##########
common/src/main/java/org/apache/gravitino/dto/requests/TagValuesAssociateRequest.java:
##########
@@ -82,32 +81,31 @@ public TagValue[] tagValuesToRemove() {
   @Override
   public void validate() throws IllegalArgumentException {
     Preconditions.checkArgument(
-        tagsToAdd != null || tagsToRemove != null,
-        "tagsToAdd and tagsToRemove cannot both be null");
+        tagsToAdd != null && tagsToRemove != null,
+        "tagsToAdd and tagsToRemove must be arrays; use empty arrays when no 
tags are provided");

Review Comment:
   You only removes the tag values. The tagsToAdd should be an empty array.
   You only adds the tag values. The TagsToRemove should be an empty array.



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