Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@

import java.io.IOException;
import java.time.Instant;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.NoSuchElementException;

import org.apache.commons.collections.ListUtils;
import org.apache.hadoop.hdds.client.OzoneQuota;
import org.apache.hadoop.hdds.conf.ConfigurationSource;
import org.apache.hadoop.hdds.scm.client.HddsClientUtils;
Expand Down Expand Up @@ -124,7 +125,7 @@ protected OzoneVolume(Builder builder) {
this.creationTime.getEpochSecond(), this.creationTime.getNano());
}
}
this.acls = builder.acls;
this.acls = new ArrayList<>(builder.acls);
if (builder.conf != null) {
this.listCacheSize = HddsClientUtils.getListCacheSize(builder.conf);
}
Expand Down Expand Up @@ -203,7 +204,7 @@ public Instant getModificationTime() {
* @return aclMap
*/
public List<OzoneAcl> getAcls() {
return ListUtils.unmodifiableList(acls);
return Collections.unmodifiableList(acls);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ public void testCreateBucket() {

@Test
public void testBucketACLOperations() {
// TODO: Uncomment assertions when bucket S3 ACL logic has been fixed
// TODO HDDS-11738: Uncomment assertions when bucket S3 ACL logic has been fixed
final String bucketName = getBucketName();

AccessControlList aclList = new AccessControlList();
Expand All @@ -235,15 +235,12 @@ public void testBucketACLOperations() {

s3Client.createBucket(createBucketRequest);

// AccessControlList retrievedAclList = s3.getBucketAcl(bucketName);
// assertEquals(aclList, retrievedAclList);
//assertEquals(aclList, s3Client.getBucketAcl(bucketName));

// aclList.grantPermission(grantee, Permission.Write);
// s3.setBucketAcl(bucketName, aclList);

// retrievedAclList = s3.getBucketAcl(bucketName);
// assertEquals(aclList, retrievedAclList);
aclList.grantPermission(grantee, Permission.Write);
s3Client.setBucketAcl(bucketName, aclList);

//assertEquals(aclList, s3Client.getBucketAcl(bucketName));
}

@Test
Expand Down