[jdk17u-dev] RFR: 8305763: Parsing a URI with an underscore goes through a silent exception, negatively impacting performance

Dhamoder Nalla dhanalla at openjdk.org
Thu Jun 22 20:47:15 UTC 2023


On Tue, 13 Jun 2023 16:58:19 GMT, Dhamoder Nalla <dhanalla at openjdk.org> wrote:

> Backport https://github.com/openjdk/jdk/pull/13430

Validations with 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

-------------

PR Comment: https://git.openjdk.org/jdk17u-dev/pull/1428#issuecomment-1603291458


More information about the jdk-updates-dev mailing list