adoroszlai commented on code in PR #6205:
URL: https://github.com/apache/ozone/pull/6205#discussion_r1486197921


##########
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/OzoneAcl.java:
##########
@@ -97,9 +97,23 @@ public OzoneAcl(ACLIdentityType type, String name, ACLType 
acl,
    *
    * @param type   - Type
    * @param name   - Name of user
-   * @param acls   - Rights
    * @param scope  - AclScope
+   * @param acls   - Rights
    */
+  public OzoneAcl(ACLIdentityType type, String name, AclScope scope, 
ACLType... acls) {
+    this(type, name, bitSetOf(acls), scope);
+  }
+
+  private static BitSet bitSetOf(ACLType... acls) {
+    BitSet bits = new BitSet();
+    if (acls != null && acls.length > 0) {

Review Comment:
   I know that it's not strictly necessary.  I have two problems:
   
   1. Don't know the runtime cost of creating an iterator for the empty array 
in the for loop behind the scene.  Maybe the compiler optimizes it away.
   2. Running full CI again for such a cosmetic change does not seem worth the 
effort.  Especially when the reviewer cannot spend the extra 10 seconds to 
write "nit:" or something like that.



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