You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Daniel H. Peger (JIRA)" <ji...@apache.org> on 2018/11/12 12:47:00 UTC
[jira] [Updated] (CXF-7896) Paths cannot be appended to UriBuilder
anymore if created with UriBuilder.fromUri
[ https://issues.apache.org/jira/browse/CXF-7896?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daniel H. Peger updated CXF-7896:
---------------------------------
Description:
With CXF 3.2.1 the below test succeeded with 3.2.2 it is failing. Starting with 3.2.2 if using {{UriBuilder.fromUri}} the URI's path is kind of immutable and all appended path elements are ignored.
{code}
URI baseUri = new URI("file:///tmp/someDir/");
URI actualUri = UriBuilder.fromUri(baseUri).path("someFile").build();
Assert.assertEquals(new URI("file:///tmp/someDir/someFile"), actualUri);
{code}
This is caused by this commit https://github.com/apache/cxf/commit/e6ec5b785e67bbd2464796119a9cdcacf59598c8 that targets to fix CXF-7625.
The workaround is to use {{UriBuilder.fromPath}} instead which results in the old behaviour.
was:
With CXF 3.2.1 the below test succeeded. Starting with 3.2.2 if using {{UriBuilder.fromUri}} the URI's path is kind of immutable and all appended path elements are ignored.
{code}
URI baseUri = new URI("file:///tmp/someDir/");
URI actualUri = UriBuilder.fromUri(baseUri).path("someFile").build();
Assert.assertEquals(new URI("file:///tmp/someDir/someFile"), actualUri);
{code}
This is caused by this commit https://github.com/apache/cxf/commit/e6ec5b785e67bbd2464796119a9cdcacf59598c8 that targets to fix CXF-7625.
The workaround is to use {{UriBuilder.fromPath}} instead which results in the old behaviour.
> Paths cannot be appended to UriBuilder anymore if created with UriBuilder.fromUri
> ---------------------------------------------------------------------------------
>
> Key: CXF-7896
> URL: https://issues.apache.org/jira/browse/CXF-7896
> Project: CXF
> Issue Type: Bug
> Affects Versions: 3.2.2
> Reporter: Daniel H. Peger
> Priority: Major
>
> With CXF 3.2.1 the below test succeeded with 3.2.2 it is failing. Starting with 3.2.2 if using {{UriBuilder.fromUri}} the URI's path is kind of immutable and all appended path elements are ignored.
> {code}
> URI baseUri = new URI("file:///tmp/someDir/");
> URI actualUri = UriBuilder.fromUri(baseUri).path("someFile").build();
> Assert.assertEquals(new URI("file:///tmp/someDir/someFile"), actualUri);
> {code}
> This is caused by this commit https://github.com/apache/cxf/commit/e6ec5b785e67bbd2464796119a9cdcacf59598c8 that targets to fix CXF-7625.
> The workaround is to use {{UriBuilder.fromPath}} instead which results in the old behaviour.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)