RFR: 8282395: URL.openConnection can throw IOOBE [v2]

KIRIYAMA Takuya duke at openjdk.org
Mon Jun 27 05:35:02 UTC 2022


On Wed, 15 Jun 2022 10:23:40 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:

>> KIRIYAMA Takuya 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:
>> 
>>  - #8282395 URL.openConnection can throw IOOBE
>>  - Merge branch 'master' into 8282395
>>  - 8282395: URL.openConnection can throw IOOBE
>
> src/java.base/share/classes/java/net/URL.java line 1101:
> 
>> 1099:             throw new MalformedURLException(e.getMessage());
>> 1100:         }
>> 1101:         return url;
> 
> Please revert the changes in java.net.URL. It's not the proper place to do the conversion. If a conversion is needed, it should take place in the handler.
> One possible experiment could be to  change `ParseUtil::decode` to declare `throws MalformedURLException` and see what no longer compiles. If compilation passes - then maybe that's the way to go. If it doesn't - then we could analyze what to do on a case-by-case basis.

@dfuch 
Could you tell me your opinion based on this information, please?

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

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


More information about the net-dev mailing list