RFR: 8272702: Resolving URI relative path with no / may lead to incorrect toString [v2]
KIRIYAMA Takuya
duke at openjdk.org
Fri Jun 17 09:35:23 UTC 2022
On Wed, 1 Jun 2022 14:15:31 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:
>> KIRIYAMA Takuya has updated the pull request incrementally with one additional commit since the last revision:
>>
>> 8272702: Resolving URI relative path with no / may lead to incorrect toString
>
> src/java.base/share/classes/java/net/URI.java line 2140:
>
>> 2138: } else {
>> 2139: sb.append("/");
>> 2140: }
>
> This is wrong as it will cause `URI.create("foo").resolve(URI.create("test"))` to return `"/test"` instead of `"test"`
@dfuch
Could you review this fix again, please?
-------------
PR: https://git.openjdk.org/jdk/pull/8899
More information about the net-dev
mailing list