roryqi commented on code in PR #12384:
URL: https://github.com/apache/gravitino/pull/12384#discussion_r3726911301
##########
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:
Updated. The request now allows `tagsToAdd` / `tagsToRemove` to be null and
normalizes null to an empty array internally. If both sides are null/empty
after normalization, validation still rejects it as an empty association
request.
--
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]