RFR: 8305763 : Parsing a URI with an underscore goes through a silent exception, negatively impacting performance
Dhamoder Nalla
duke at openjdk.org
Tue May 16 17:22:46 UTC 2023
On Tue, 25 Apr 2023 18:20:16 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:
>> Thanks for reviewing @dfuch,
>> With this change, the below operation returns hostname "foo_bar"
>>
>> jshell> new URI("http://foo_bar:8080/").getHost()
>>
>> I will work on addressing this to keep the old behavior unchanged.
>
>> I will work on addressing this to keep the old behavior unchanged.
>
> Please make sure to run the java/net/URI tests - and when these are successful, tier1, tier2 and tier3.
Thanks @dfuch,
I have validated the following tests with the new change.
1. JShell:
jshell> new URI("http://foo_bar:8080/").getHost()
$1 ==> null
jshell> new URI("http://foo_bar:8080/").getPort()
$2 ==> -1
jshell> new URI("http://foobar:8080/").getHost()
$3 ==> "foobar"
jshell> new URI("http://foobar:8080/").getPort()
$4 ==> 8080
2. all tests under "java/net/URI" passed as expected.
3. no failures related my change in tier1, tier2 and tier3 tests.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/13430#issuecomment-1550071618
More information about the net-dev
mailing list