cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrzej Michalec (JIRA)" <>
Subject [jira] Commented: (CXF-1991) Incomplete implementations of UriInfo and UriBuilder
Date Tue, 20 Jan 2009 23:31:59 GMT


Andrzej Michalec commented on CXF-1991:

OK, I am very close to get stable state (source + unit test + system tests) however I found
some weird behavior of current UriBuilderImpl code that impacts new code behavior:

I am not sure what is expected behavior when one of interior path elements has trailing slash
(here: "baz/"). It leads to failure of this new test case:

public class UriBuilderImplTest {
    public void testAddPathSlashes() throws Exception {
        URI uri = new URI("http://foo/");
        URI newUri = new UriBuilderImpl().uri(uri).path("/bar").path("baz/").path("/blah/").build();
        assertEquals("URI is not built correctly", new URI("http://foo/bar/baz/blah"), newUri);

UriBuilderImpl  produces here double slash after "baz". It is because internally JAXRSUtils.getPathSegments(String)
distinguishes trailing slash and generates empty path segment -- and I am not sure why, since
JAX-RS spec says leading/trailing slashes are meaningless, only correct path segments separation
is important. Any ideas?


> Incomplete implementations of UriInfo and UriBuilder
> ----------------------------------------------------
>                 Key: CXF-1991
>                 URL:
>             Project: CXF
>          Issue Type: Bug
>          Components: REST
>    Affects Versions: 2.1.3, 2.2
>            Reporter: Andrzej Michalec
>            Priority: Minor
> Some useful methods like UriBuilder.path(Class), UriBuilder.path(Method) or UriInfo.getMatchedResources()
are not implemented so far.
> Since I am have my locally tuned versions of these classes I am going to provide patch
soon :)
> cheers,
> andy.

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

View raw message