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


##########
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/OzoneAcl.java:
##########
@@ -58,17 +59,12 @@ public class OzoneAcl {
   private final AclScope aclScope;
   private static final List<ACLType> EMPTY_LIST = new ArrayList<>(0);
 
-  // TODO use varargs constructor
-  public OzoneAcl(ACLIdentityType type, String name, ACLType acl, AclScope 
scope) {
-    this(type, name, scope, bitSetOf(acl));
-  }
-
   public OzoneAcl(ACLIdentityType type, String name, AclScope scope, 
ACLType... acls) {
     this(type, name, scope, bitSetOf(acls));
   }
 
-  public OzoneAcl(ACLIdentityType type, String name, BitSet acls, AclScope 
scope) {
-    this(type, name, scope, validateAndCopy(acls));
+  public OzoneAcl(ACLIdentityType type, String name, AclScope scope, 
EnumSet<ACLType> acls) {
+    this(type, name, scope, bitSetOf(acls.toArray(new ACLType[0])));

Review Comment:
   That's how 
[`toArray(T[])`](https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html#toArray-T:A-)
 knows the return type.  Otherwise 
[`toArray()`](https://docs.oracle.com/javase/8/docs/api/java/util/Collection.html#toArray--)
 can only return `Object[]`.



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