RFR: 8282395: URL.openConnection can throw IOOBE [v2]
KIRIYAMA Takuya
duke at openjdk.org
Fri Sep 16 06:15:01 UTC 2022
On Mon, 5 Sep 2022 14:29:29 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:
>> @dfuch
>>
>> I'm sorry, it took time for me to think about how to fix.
>> First, I thought of option 3, but it seems difficult.
>> In many of the methods in error, the javadoc defines the exceptions that can be thrown.
>> When option 3, we will wrap exceptions in many methods because it is difficult to fix specifications of all methods and CSR.
>> However, if we are going to wrap exceptions, I think it's better and less fix to do it in a protocol handler, it means option 4.2.
>>
>> Let me hear what you think.
>
> 4.2 might be fine especially if we can do it at the point were ParseUtils is called.
@dfuch
Thank you very much. Your advice was very helpful in fix.
I fixed sun.net.www.protocol.ftp.Hanler.openConnection to throw MalformedURLException.
Hanler classes in other protcol should not be fixed because they don't use ParseUtil.decode method.
-------------
PR: https://git.openjdk.org/jdk/pull/8155
More information about the net-dev
mailing list