Allow empty delimiters with openstack-swift

This commit is contained in:
Andrew Gaul 2017-09-07 12:28:41 -07:00
parent 4765590bc9
commit 57dceaf56f
1 changed files with 2 additions and 1 deletions

View File

@ -21,6 +21,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
import org.jclouds.blobstore.options.ListContainerOptions;
import com.google.common.base.Function;
import com.google.common.base.Strings;
public class ToListContainerOptions implements
Function<ListContainerOptions, org.jclouds.openstack.swift.v1.options.ListContainerOptions> {
@ -45,7 +46,7 @@ public class ToListContainerOptions implements
} else if (!from.isRecursive()) {
options.delimiter('/');
}
if (from.getDelimiter() != null) {
if (!Strings.isNullOrEmpty(from.getDelimiter())) {
if (from.getDelimiter().length() != 1) {
throw new IllegalArgumentException("Delimiter must be a single character");
}