ivandika3 commented on code in PR #6319:
URL: https://github.com/apache/ozone/pull/6319#discussion_r1510633210


##########
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/OzoneAcl.java:
##########
@@ -293,17 +246,46 @@ public String getName() {
     return name;
   }
 
-  /**
-   * Returns Rights.
-   *
-   * @return - Rights
-   */
-  public BitSet getAclBitSet() {
-    return aclBitSet;
+  @JsonIgnore
+  public boolean isEmpty() {
+    return aclBitSet.isEmpty();
+  }
+
+  public boolean isSet(ACLType acl) {
+    return aclBitSet.get(acl.ordinal());
+  }
+
+  public boolean checkAccess(ACLType acl) {
+    return ((aclBitSet.get(acl.ordinal())

Review Comment:
   Also can add `@VisibleForTesting` for `isSet` since it seems to be only used 
in tests.



##########
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/OzoneAcl.java:
##########
@@ -293,17 +246,46 @@ public String getName() {
     return name;
   }
 
-  /**
-   * Returns Rights.
-   *
-   * @return - Rights
-   */
-  public BitSet getAclBitSet() {
-    return aclBitSet;
+  @JsonIgnore
+  public boolean isEmpty() {
+    return aclBitSet.isEmpty();
+  }
+
+  public boolean isSet(ACLType acl) {
+    return aclBitSet.get(acl.ordinal());
+  }
+
+  public boolean checkAccess(ACLType acl) {
+    return ((aclBitSet.get(acl.ordinal())

Review Comment:
   Also let's add `@VisibleForTesting` for `isSet` since it seems to be only 
used in tests.



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