You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jclouds.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2014/05/26 04:06:01 UTC

[jira] [Commented] (JCLOUDS-562) Listing objects with a space in the name with ObjectApi causes URISyntaxException

    [ https://issues.apache.org/jira/browse/JCLOUDS-562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14008519#comment-14008519 ] 

ASF subversion and git services commented on JCLOUDS-562:
---------------------------------------------------------

Commit 120e2b0f0e6ae025489bd37bcfe082dc663430fe in jclouds-labs-openstack's branch refs/heads/master from [~jdaggett]
[ https://git-wip-us.apache.org/repos/asf?p=jclouds-labs-openstack.git;h=120e2b0 ]

JCLOUDS-562: Decode object names with spaces, added test cases and updated test names.


> Listing objects with a space in the name with ObjectApi causes URISyntaxException
> ---------------------------------------------------------------------------------
>
>                 Key: JCLOUDS-562
>                 URL: https://issues.apache.org/jira/browse/JCLOUDS-562
>             Project: jclouds
>          Issue Type: Bug
>          Components: jclouds-labs-openstack
>    Affects Versions: 1.7.2
>            Reporter: Everett Toews
>            Assignee: Jeremy Daggett
>            Priority: Critical
>              Labels: openstack, rackspace
>
> 1. Create a container.
> 2. Upload an object with a space in the object name.
> 3. Run code similar to what's below.
> {code}
>    private void listContainersAndObjects() {
>       ContainerApi containerApi = swiftApi.containerApiInRegion("DFW");
>       for (Container container: containerApi.list().toList()) {
>          System.out.println(container.getName());
>          ObjectApi objectApi = swiftApi.objectApiInRegionForContainer("DFW", container.getName());
>          for (SwiftObject object: objectApi.list()) {
>             System.out.println("  " + object.getName());
>          }
>       }
>    }
> {code}
> It causes the URISyntaxException below.
> {code}
> java.lang.IllegalArgumentException
>   at java.net.URI.create(URI.java:841)
>   at org.jclouds.openstack.swift.v1.functions.ParseObjectListFromResponse$ToSwiftObject.apply(ParseObjectListFromResponse.java:77)
>   at org.jclouds.openstack.swift.v1.functions.ParseObjectListFromResponse$ToSwiftObject.apply(ParseObjectListFromResponse.java:68)
>   at com.google.common.collect.Lists$TransformingRandomAccessList$1.transform(Lists.java:582)
>   at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:48)
>   at com.rackspace.RCCCSolution.listContainersAndObjects(RCCCSolution.java:48)
>   at com.rackspace.RCCCSolution.main(RCCCSolution.java:21)
>   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>   at java.lang.reflect.Method.invoke(Method.java:597)
>   at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
> Caused by: java.net.URISyntaxException: Illegal character in path at index 105: https://storage101.dfw1.clouddrive.com/v1/xxx/Trove/Open Cluster.txt
>   at java.net.URI$Parser.fail(URI.java:2810)
>   at java.net.URI$Parser.checkChars(URI.java:2983)
>   at java.net.URI$Parser.parseHierarchical(URI.java:3067)
>   at java.net.URI$Parser.parse(URI.java:3015)
>   at java.net.URI.<init>(URI.java:577)
>   at java.net.URI.create(URI.java:839)
>   ... 11 more
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)