RFR: 8293590: Some syntax checks performed by URL.openConnection() could be performed earlier, at URL construction [v3]

Daniel Fuchs dfuchs at openjdk.org
Fri Oct 7 10:03:18 UTC 2022


On Fri, 7 Oct 2022 07:52:53 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> Daniel Fuchs has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:
>> 
>>  - Merge branch 'master' into url-early-parsing-8293590
>>  - Merge branch 'master' into url-early-parsing-8293590
>>  - 8293590
>
> src/java.base/share/classes/java/net/URLStreamHandler.java line 515:
> 
>> 513:         if (host != null && isBuiltInHandler) {
>> 514:             String errMsg = IPAddressUtil.checkHostString(host);
>> 515:             if (errMsg != null) throw new IllegalArgumentException(errMsg);
> 
> Is it time for URLStreamHandler.setURL to document the IllegalArgumentException?

Good point. I have logged https://bugs.openjdk.org/browse/JDK-8294948 to follow-up on this.

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

PR: https://git.openjdk.org/jdk/pull/10534


More information about the net-dev mailing list