You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Aja Walker (JIRA)" <ji...@apache.org> on 2011/03/08 00:40:59 UTC

[jira] Created: (AMQ-3209) URISupport.createURIWithQuery() fails on some composite uris.

URISupport.createURIWithQuery() fails on some composite uris.
-------------------------------------------------------------

                 Key: AMQ-3209
                 URL: https://issues.apache.org/jira/browse/AMQ-3209
             Project: ActiveMQ
          Issue Type: Bug
    Affects Versions: 5.5.0
            Reporter: Aja Walker
            Priority: Minor
         Attachments: URISupportTest.java.diff

URISupport.createURIWithQuery() fails on composite URIs that have an inner query but not an outer query, e.g.:

outerscheme:(innerscheme:innerssp?innerquery=0)

The failure is due to the method not taking into account this possibility and assuming the query consists of everything  after the last question mark.  The attached patch is for a test case in org.apache.activemq.util.URISupportTest that demonstrates the problem.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Updated: (AMQ-3209) URISupport.createURIWithQuery() fails on some composite uris.

Posted by "Aja Walker (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AMQ-3209?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aja Walker updated AMQ-3209:
----------------------------

    Description: 
URISupport.createURIWithQuery() fails on composite URIs that have an inner query but not an outer query, e.g.:

outerscheme:(innerscheme:innerssp?innerquery=0)

The failure is due to the method not taking into account this possibility and assuming the query consists of everything  after the last question mark.  The attached patch adds a test case in org.apache.activemq.util.URISupportTest that demonstrates the problem, and also modifies URISupport.createURIWithQuery() with a suggested fix for the problem.

  was:
URISupport.createURIWithQuery() fails on composite URIs that have an inner query but not an outer query, e.g.:

outerscheme:(innerscheme:innerssp?innerquery=0)

The failure is due to the method not taking into account this possibility and assuming the query consists of everything  after the last question mark.  The attached patch is for a test case in org.apache.activemq.util.URISupportTest that demonstrates the problem.


> URISupport.createURIWithQuery() fails on some composite uris.
> -------------------------------------------------------------
>
>                 Key: AMQ-3209
>                 URL: https://issues.apache.org/jira/browse/AMQ-3209
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.5.0
>            Reporter: Aja Walker
>            Priority: Minor
>              Labels: util
>         Attachments: URISupport.patch
>
>
> URISupport.createURIWithQuery() fails on composite URIs that have an inner query but not an outer query, e.g.:
> outerscheme:(innerscheme:innerssp?innerquery=0)
> The failure is due to the method not taking into account this possibility and assuming the query consists of everything  after the last question mark.  The attached patch adds a test case in org.apache.activemq.util.URISupportTest that demonstrates the problem, and also modifies URISupport.createURIWithQuery() with a suggested fix for the problem.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (AMQ-3209) URISupport.createURIWithQuery() fails on some composite uris.

Posted by "Aja Walker (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3209?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13004590#comment-13004590 ] 

Aja Walker commented on AMQ-3209:
---------------------------------

Timothy, yes, you are right I think.  We should only have to check for the last parenthesis.  I was worried about getting confused on an orphan closing parenthesis, but in reality that would seem to indicate a malformed URI, and so in that case we shouldn't have to guarantee any particular behavior.

I've created a new patch that only checks for closing parenthesis and also fixes the backwards assert statements in the unit tests.  I'm going to upload this new patch over the previous one.

> URISupport.createURIWithQuery() fails on some composite uris.
> -------------------------------------------------------------
>
>                 Key: AMQ-3209
>                 URL: https://issues.apache.org/jira/browse/AMQ-3209
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.5.0
>            Reporter: Aja Walker
>            Priority: Minor
>              Labels: util
>         Attachments: URISupport.patch, URISupport.patch
>
>
> URISupport.createURIWithQuery() fails on composite URIs that have an inner query but not an outer query, e.g.:
> outerscheme:(innerscheme:innerssp?innerquery=0)
> The failure is due to the method not taking into account this possibility and assuming the query consists of everything  after the last question mark.  The attached patch adds a test case in org.apache.activemq.util.URISupportTest that demonstrates the problem, and also modifies URISupport.createURIWithQuery() with a suggested fix for the problem.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Updated: (AMQ-3209) URISupport.createURIWithQuery() fails on some composite uris.

Posted by "Aja Walker (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AMQ-3209?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aja Walker updated AMQ-3209:
----------------------------

    Attachment: URISupportTest.java.diff

> URISupport.createURIWithQuery() fails on some composite uris.
> -------------------------------------------------------------
>
>                 Key: AMQ-3209
>                 URL: https://issues.apache.org/jira/browse/AMQ-3209
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.5.0
>            Reporter: Aja Walker
>            Priority: Minor
>              Labels: util
>         Attachments: URISupportTest.java.diff
>
>
> URISupport.createURIWithQuery() fails on composite URIs that have an inner query but not an outer query, e.g.:
> outerscheme:(innerscheme:innerssp?innerquery=0)
> The failure is due to the method not taking into account this possibility and assuming the query consists of everything  after the last question mark.  The attached patch is for a test case in org.apache.activemq.util.URISupportTest that demonstrates the problem.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Updated: (AMQ-3209) URISupport.createURIWithQuery() fails on some composite uris.

Posted by "Aja Walker (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AMQ-3209?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aja Walker updated AMQ-3209:
----------------------------

    Attachment: URISupport.patch

> URISupport.createURIWithQuery() fails on some composite uris.
> -------------------------------------------------------------
>
>                 Key: AMQ-3209
>                 URL: https://issues.apache.org/jira/browse/AMQ-3209
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.5.0
>            Reporter: Aja Walker
>            Priority: Minor
>              Labels: util
>         Attachments: URISupport.patch, URISupport.patch
>
>
> URISupport.createURIWithQuery() fails on composite URIs that have an inner query but not an outer query, e.g.:
> outerscheme:(innerscheme:innerssp?innerquery=0)
> The failure is due to the method not taking into account this possibility and assuming the query consists of everything  after the last question mark.  The attached patch adds a test case in org.apache.activemq.util.URISupportTest that demonstrates the problem, and also modifies URISupport.createURIWithQuery() with a suggested fix for the problem.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Updated: (AMQ-3209) URISupport.createURIWithQuery() fails on some composite uris.

Posted by "Aja Walker (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AMQ-3209?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aja Walker updated AMQ-3209:
----------------------------

    Attachment:     (was: URISupportTest.java.diff)

> URISupport.createURIWithQuery() fails on some composite uris.
> -------------------------------------------------------------
>
>                 Key: AMQ-3209
>                 URL: https://issues.apache.org/jira/browse/AMQ-3209
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.5.0
>            Reporter: Aja Walker
>            Priority: Minor
>              Labels: util
>
> URISupport.createURIWithQuery() fails on composite URIs that have an inner query but not an outer query, e.g.:
> outerscheme:(innerscheme:innerssp?innerquery=0)
> The failure is due to the method not taking into account this possibility and assuming the query consists of everything  after the last question mark.  The attached patch is for a test case in org.apache.activemq.util.URISupportTest that demonstrates the problem.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Updated: (AMQ-3209) URISupport.createURIWithQuery() fails on some composite uris.

Posted by "Aja Walker (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AMQ-3209?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aja Walker updated AMQ-3209:
----------------------------

    Attachment: URISupport.patch

> URISupport.createURIWithQuery() fails on some composite uris.
> -------------------------------------------------------------
>
>                 Key: AMQ-3209
>                 URL: https://issues.apache.org/jira/browse/AMQ-3209
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.5.0
>            Reporter: Aja Walker
>            Priority: Minor
>              Labels: util
>         Attachments: URISupport.patch
>
>
> URISupport.createURIWithQuery() fails on composite URIs that have an inner query but not an outer query, e.g.:
> outerscheme:(innerscheme:innerssp?innerquery=0)
> The failure is due to the method not taking into account this possibility and assuming the query consists of everything  after the last question mark.  The attached patch adds a test case in org.apache.activemq.util.URISupportTest that demonstrates the problem, and also modifies URISupport.createURIWithQuery() with a suggested fix for the problem.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Resolved: (AMQ-3209) URISupport.createURIWithQuery() fails on some composite uris.

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AMQ-3209?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Timothy Bish resolved AMQ-3209.
-------------------------------

       Resolution: Fixed
    Fix Version/s: 5.5.0
         Assignee: Timothy Bish

Patch applied, thanks.

> URISupport.createURIWithQuery() fails on some composite uris.
> -------------------------------------------------------------
>
>                 Key: AMQ-3209
>                 URL: https://issues.apache.org/jira/browse/AMQ-3209
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.5.0
>            Reporter: Aja Walker
>            Assignee: Timothy Bish
>            Priority: Minor
>              Labels: util
>             Fix For: 5.5.0
>
>         Attachments: URISupport.patch, URISupport.patch
>
>
> URISupport.createURIWithQuery() fails on composite URIs that have an inner query but not an outer query, e.g.:
> outerscheme:(innerscheme:innerssp?innerquery=0)
> The failure is due to the method not taking into account this possibility and assuming the query consists of everything  after the last question mark.  The attached patch adds a test case in org.apache.activemq.util.URISupportTest that demonstrates the problem, and also modifies URISupport.createURIWithQuery() with a suggested fix for the problem.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Commented: (AMQ-3209) URISupport.createURIWithQuery() fails on some composite uris.

Posted by "Timothy Bish (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AMQ-3209?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13004299#comment-13004299 ] 

Timothy Bish commented on AMQ-3209:
-----------------------------------

Looking at your patch I think it probably would suffice to check if the "?" lies beyond the last parenthesis instead of searching for the matching set, what do you think?

Also the assert statements in the unit tests have the arguments backwards, the expected result should be first, otherwise the error message is a bit confusing.  

> URISupport.createURIWithQuery() fails on some composite uris.
> -------------------------------------------------------------
>
>                 Key: AMQ-3209
>                 URL: https://issues.apache.org/jira/browse/AMQ-3209
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.5.0
>            Reporter: Aja Walker
>            Priority: Minor
>              Labels: util
>         Attachments: URISupport.patch
>
>
> URISupport.createURIWithQuery() fails on composite URIs that have an inner query but not an outer query, e.g.:
> outerscheme:(innerscheme:innerssp?innerquery=0)
> The failure is due to the method not taking into account this possibility and assuming the query consists of everything  after the last question mark.  The attached patch adds a test case in org.apache.activemq.util.URISupportTest that demonstrates the problem, and also modifies URISupport.createURIWithQuery() with a suggested fix for the problem.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira