RFR: 8294948: Document IllegalArgumentException and NullPointerException thrown by URLStreamHandler::parseURL and URLStreamHandler::setURL [v8]

Daniel Fuchs dfuchs at openjdk.org
Wed Oct 19 12:16:05 UTC 2022


On Wed, 19 Oct 2022 11:25:14 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 10 additional commits since the last revision:
>> 
>>  - More review comments
>>  - Taking into account review feedback
>>  - Merge branch 'master' into url-iae-8294948
>>  - Merge branch 'master' into url-iae-8294948
>>  - Minor wording updates - unmmapable single quote character
>>  - Minor wording updates
>>  - Update Copyright Years
>>  - Adding missing @throws NPE
>>  - 8294948
>>  - 8294948
>
> src/java.base/share/classes/java/net/URL.java line 580:
> 
>> 578:      * @implSpec Parsing the URL involves calling the {@link
>> 579:      * URLStreamHandler#parseURL(URL, String, int, int) parseURL} method on the
>> 580:      * selected handler.
> 
> What you would think about making this more direct, e.g. "This constructor invokes the selected stream handler's parseURL method to parse the URL."

Well some of the parsing is done in URL itself: like finding the fragment, if any, setting up start and limit etc... And I didn't want to get into the rabbit hole of trying to specify what does what exactly. I can still take your suggested text if you believe it doesn't matter?

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

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


More information about the net-dev mailing list