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

KIRIYAMA Takuya duke at openjdk.org
Thu Sep 29 09:57:23 UTC 2022


On Wed, 28 Sep 2022 11:13:49 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:

>> KIRIYAMA Takuya has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   8282395: URL.openConnection can throw IOOBE
>
> src/java.base/share/classes/sun/net/www/protocol/ftp/Handler.java line 66:
> 
>> 64:             connection = new FtpURLConnection(u, p);
>> 65:         } catch (IllegalArgumentException e) {
>> 66:             throw new MalformedURLException(e.getMessage());
> 
> I'd suggest keeping the IllegalArgumentException as the root cause of the MUE for better diagnosability. Otherwise LGTM.

The constructor "MalformedURLException (Throwable cause)" doens'nt exist. Isn't there any other method?

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

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


More information about the net-dev mailing list