Timur Alperovich created JCLOUDS-1313:

             Summary: Filesystem blob store does not handle empty string LIST 
options properly
                 Key: JCLOUDS-1313
                 URL: https://issues.apache.org/jira/browse/JCLOUDS-1313
             Project: jclouds
          Issue Type: Bug
          Components: jclouds-blobstore
            Reporter: Timur Alperovich

When attempting to list a container and setting prefix. delimiter, and marker 
to "", the filesystem blobstore does not return any entries. Against AWS, 
setting the values to an empty is tantamount to not setting them at all.

Here is an example that fails. A similar test against AWS succeeds.

public void testList_EmptyOptionSingleContainer() throws IOException {
       blobStore.createContainerInLocation(null, CONTAINER_NAME);

       checkForContainerContent(CONTAINER_NAME, null);

       TestUtils.createBlobsInContainer(CONTAINER_NAME, "a", "b", "c");
       // Test listing where we set the prefix and delimiter to empty string
       ListContainerOptions options = ListContainerOptions.Builder.delimiter("")
       PageSet<? extends StorageMetadata> rs = blobStore.list(CONTAINER_NAME, 
       assertEquals(rs.size(), 3);
       Set<String> expected = Sets.newHashSet("a", "b", "c");
       for (StorageMetadata sm : rs) {

This message was sent by Atlassian JIRA

Reply via email to