[
https://issues.apache.org/jira/browse/CXF-1991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12665635#action_12665635
]
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 {
@Test
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?
cheers,
andy.
> Incomplete implementations of UriInfo and UriBuilder
> ----------------------------------------------------
>
> Key: CXF-1991
> URL: https://issues.apache.org/jira/browse/CXF-1991
> 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.