ChenSammi commented on code in PR #11975:
URL: https://github.com/apache/ozone/pull/11975#discussion_r4583583398
##########
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:
@billygoatish , thanks for the explain. Do you see any case what we need to
distinguish between "new OmLCFilter.Builder().build(); " and "new
OmLCFilter.Builder().setTag(null, null).build(); ", and the second one could do
harm to Ozone?
##########
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:
@billygoatish , thanks for the explain. Do you see any case what we need to
distinguish between "new OmLCFilter.Builder().build(); " and "new
OmLCFilter.Builder().setTag(null, null).build(); ", and the second one could do
some harm to Ozone?
--
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]