[8u] RFR: 8051853: new URI("x/").resolve("..").getSchemeSpecificPart() returns null!
Alex Kashchenko
akashche at redhat.com
Mon Sep 7 11:19:42 UTC 2020
On 09/07/2020 07:23 AM, Andrew Hughes wrote:
> On 17:32 Thu 03 Sep , Alex Kashchenko wrote:
>> Hi,
>>
>> Please review the fix to 8051853 for 8u.
>>
>> Note, the problem is not reproducible in 9+, it was fixed there as a
>> part of "8146686: Create the schemeSpecificPart for non-opaque URIs
>> lazily" .
>>
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8051853
>>
>> Related maillist discussion:
>> https://mail.openjdk.java.net/pipermail/net-dev/2016-January/009467.html
>>
>> Related point in 8146686:
>> https://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/16296b4145d0#l1.30
>>
>> 8u webrev: https://cr.openjdk.java.net/~akasko/jdk8u/8051853/webrev.00/
>>
>> If appendSchemeSpecificPart() doesn't append anything to the specified
>> buffer, then defineSchemeSpecificPart() returns early and
>> schemeSpecificPart variable remains null. Proposed change removes
>> "early return" branch.
>>
>> --
>> -Alex
>>
>
> Looks good to me. A zero length StringBuffer can be converted to an empty
> String ("") by the toString() method, so there is no need to special case
> this. Amazes me this has been broken so long!
Thanks for the review! I've added fix request to the issue.
--
-Alex
More information about the jdk8u-dev
mailing list