You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Christopher Sahnwaldt (JIRA)" <ji...@apache.org> on 2007/09/12 22:29:22 UTC

[jira] Commented: (AMQ-1385) URISupport.parseComposite() incorrectly decodes URI parts

    [ https://issues.apache.org/activemq/browse/AMQ-1385?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_40130 ] 

Christopher Sahnwaldt commented on AMQ-1385:
--------------------------------------------

The following throws an exception:
{code}
URI uri = new URI("vm://localhost/?broker.dataDirectory=C:/Documents%20and%20Settings/foo/bar");
new ActiveMQConnectionFactory(uri).createConnection().close();
{code}

The test works when one line in URISupport.parseComposite() is changed: use getRawSchemeSpecificPart() instead of getSchemeSpecificPart().
{code}
String ssp = stripPrefix(uri.getSchemeSpecificPart().trim(), "//").trim(); // crashes
String ssp = stripPrefix(uri.getRawSchemeSpecificPart().trim(), "//").trim(); // works
{code}
This makes sense because the scheme specific part is later passed to the constructor URI(String), which expects an escaped ('raw') string.


> URISupport.parseComposite() incorrectly decodes URI parts
> ---------------------------------------------------------
>
>                 Key: AMQ-1385
>                 URL: https://issues.apache.org/activemq/browse/AMQ-1385
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 4.1.1
>            Reporter: Christopher Sahnwaldt
>            Priority: Minor
>
> org.apache.activemq.util.URISupport.parseComposite() throws an URISyntaxException for some input URIs.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.