mirror of
https://github.com/apache/jclouds.git
synced 2025-02-09 11:35:41 +00:00
Fix testListContainerWithZeroMaxResults on Swift
This commit is contained in:
parent
e8f925225c
commit
694558db0c
@ -159,7 +159,12 @@ public class RegionScopedSwiftBlobStore implements BlobStore {
|
|||||||
containerCache.put(container, Optional.of(objects.getContainer()));
|
containerCache.put(container, Optional.of(objects.getContainer()));
|
||||||
List<? extends StorageMetadata> list = transform(objects, toBlobMetadata(container));
|
List<? extends StorageMetadata> list = transform(objects, toBlobMetadata(container));
|
||||||
int limit = Optional.fromNullable(options.getMaxResults()).or(10000);
|
int limit = Optional.fromNullable(options.getMaxResults()).or(10000);
|
||||||
String marker = list.size() == limit ? list.get(limit - 1).getName() : null;
|
String marker = null;
|
||||||
|
if (list.isEmpty()) {
|
||||||
|
marker = options.getMarker();
|
||||||
|
} else if (list.size() == limit) {
|
||||||
|
marker = list.get(limit - 1).getName();
|
||||||
|
}
|
||||||
// TODO: we should probably deprecate this option
|
// TODO: we should probably deprecate this option
|
||||||
if (options.isDetailed()) {
|
if (options.isDetailed()) {
|
||||||
list = transform(list, new Function<StorageMetadata, StorageMetadata>() {
|
list = transform(list, new Function<StorageMetadata, StorageMetadata>() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user