ChenSammi commented on code in PR #11975:
URL: https://github.com/apache/ozone/pull/11975#discussion_r4536070300


##########
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OmLCFilter.java:
##########
@@ -76,6 +78,10 @@ private OmLCFilter(Builder builder) {
    * @throws OMException if the filter is invalid.
    */
   public void valid(BucketLayout layout) throws OMException {
+    if (tagSet && (tagKey == null || tagValue == null)) {

Review Comment:
   Thanks @billygoatish for identify the issue and provide the fix, overall 
looks good to me. 
   
   Can we get rid of tagSet, and use something like "(tagKey == null) != 
(tagValue == null)"? 



##########
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/helpers/OmLCFilter.java:
##########
@@ -76,6 +78,10 @@ private OmLCFilter(Builder builder) {
    * @throws OMException if the filter is invalid.
    */
   public void valid(BucketLayout layout) throws OMException {
+    if (tagSet && (tagKey == null || tagValue == null)) {

Review Comment:
   Thanks @billygoatish for identify the issue and provide the fix, overall it 
looks good to me. 
   
   Can we get rid of tagSet, and use something like "(tagKey == null) != 
(tagValue == null)"? 



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to