diff --git a/src/main/java/org/springframework/build/aws/maven/SimpleStorageServiceWagon.java b/src/main/java/org/springframework/build/aws/maven/SimpleStorageServiceWagon.java index 1e734be6..24bbfea4 100644 --- a/src/main/java/org/springframework/build/aws/maven/SimpleStorageServiceWagon.java +++ b/src/main/java/org/springframework/build/aws/maven/SimpleStorageServiceWagon.java @@ -245,7 +245,7 @@ private PutObjectRequest createDirectoryPutObjectRequest(String key) { ObjectMetadata objectMetadata = new ObjectMetadata(); objectMetadata.setContentLength(0); - return new PutObjectRequest(this.bucketName, key, inputStream, objectMetadata).withCannedAcl(CannedAccessControlList.PublicRead); + return new PutObjectRequest(this.bucketName, key, inputStream, objectMetadata); } } diff --git a/src/test/java/org/springframework/build/aws/maven/SimpleStorageServiceWagonIntegrationTest.java b/src/test/java/org/springframework/build/aws/maven/SimpleStorageServiceWagonIntegrationTest.java index 9ec8e6e2..c41f2cf1 100644 --- a/src/test/java/org/springframework/build/aws/maven/SimpleStorageServiceWagonIntegrationTest.java +++ b/src/test/java/org/springframework/build/aws/maven/SimpleStorageServiceWagonIntegrationTest.java @@ -234,7 +234,6 @@ public void putResource() throws TransferFailedException, ResourceDoesNotExistEx assertEquals(BUCKET_NAME, putObjectRequests.get(i).getBucketName()); assertNotNull(putObjectRequests.get(i).getInputStream()); assertEquals(0, putObjectRequests.get(i).getMetadata().getContentLength()); - assertEquals(CannedAccessControlList.PublicRead, putObjectRequests.get(i).getCannedAcl()); } assertEquals("foo/", putObjectRequests.get(0).getKey());