mirror of
https://github.com/apache/jclouds.git
synced 2025-02-18 07:56:30 +00:00
Allow empty delimiters with openstack-swift
This commit is contained in:
parent
4765590bc9
commit
57dceaf56f
@ -21,6 +21,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
|
|||||||
import org.jclouds.blobstore.options.ListContainerOptions;
|
import org.jclouds.blobstore.options.ListContainerOptions;
|
||||||
|
|
||||||
import com.google.common.base.Function;
|
import com.google.common.base.Function;
|
||||||
|
import com.google.common.base.Strings;
|
||||||
|
|
||||||
public class ToListContainerOptions implements
|
public class ToListContainerOptions implements
|
||||||
Function<ListContainerOptions, org.jclouds.openstack.swift.v1.options.ListContainerOptions> {
|
Function<ListContainerOptions, org.jclouds.openstack.swift.v1.options.ListContainerOptions> {
|
||||||
@ -45,7 +46,7 @@ public class ToListContainerOptions implements
|
|||||||
} else if (!from.isRecursive()) {
|
} else if (!from.isRecursive()) {
|
||||||
options.delimiter('/');
|
options.delimiter('/');
|
||||||
}
|
}
|
||||||
if (from.getDelimiter() != null) {
|
if (!Strings.isNullOrEmpty(from.getDelimiter())) {
|
||||||
if (from.getDelimiter().length() != 1) {
|
if (from.getDelimiter().length() != 1) {
|
||||||
throw new IllegalArgumentException("Delimiter must be a single character");
|
throw new IllegalArgumentException("Delimiter must be a single character");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user