mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Fixed checkstyle issues due to commit 0b6c540a203453580bb76a0d0a60be292fccfa0e
This commit is contained in:
parent
0b6c540a20
commit
c5c1b1d462
@ -339,18 +339,16 @@ public final class S3Utils {
|
|||||||
|
|
||||||
private static List<S3ObjectSummary> listDirectory(final String bucketName, final String directory, final AmazonS3 client) {
|
private static List<S3ObjectSummary> listDirectory(final String bucketName, final String directory, final AmazonS3 client) {
|
||||||
|
|
||||||
List<S3ObjectSummary> objects = new ArrayList<S3ObjectSummary>();
|
List<S3ObjectSummary> objects = new ArrayList<S3ObjectSummary>();
|
||||||
ListObjectsRequest listObjectsRequest = new ListObjectsRequest().withBucketName(bucketName).withPrefix(directory + SEPARATOR);
|
ListObjectsRequest listObjectsRequest = new ListObjectsRequest().withBucketName(bucketName).withPrefix(directory + SEPARATOR);
|
||||||
ObjectListing objectListing;
|
ObjectListing objectListing;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
objectListing = client.listObjects(listObjectsRequest);
|
objectListing = client.listObjects(listObjectsRequest);
|
||||||
|
if (objectListing != null )
|
||||||
if (objectListing != null )
|
objects.addAll(objectListing.getObjectSummaries());
|
||||||
objects.addAll(objectListing.getObjectSummaries());
|
listObjectsRequest.setMarker(objectListing.getNextMarker());
|
||||||
listObjectsRequest.setMarker(objectListing.getNextMarker());
|
} while (objectListing.isTruncated());
|
||||||
} while (objectListing.isTruncated());
|
|
||||||
|
|
||||||
if (objects.isEmpty()) {
|
if (objects.isEmpty()) {
|
||||||
return emptyList();
|
return emptyList();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user