RFR: 8314978: Multiple server call from connection failing with expect100 in getOutputStream [v2]
Vyom Tewari
vtewari at openjdk.org
Mon Sep 4 08:28:40 UTC 2023
On Mon, 4 Sep 2023 07:22:46 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:
>> Vyom Tewari has updated the pull request incrementally with one additional commit since the last revision:
>>
>> modified the junit tests names
>
> src/java.base/share/classes/sun/net/www/protocol/http/HttpURLConnection.java line 1436:
>
>> 1434: if (rememberedException != null) {
>> 1435: if (rememberedException instanceof RuntimeException) {
>> 1436: throw new RuntimeException(rememberedException);
>
> Hello Vyom, this looks a bit odd that if it's a `RuntimeException` then we are wrapping that `RuntimeException` into another `RuntimeException` before throwing. Having said that, it appears that this same thing is done in `getInputStream0()` method of this class. Do you know if that is intentional and needed? If it's not needed, perhaps we can just rethrow this `RuntimeException` without wrapping it into another?
I don't know the history but it is very old code and just to be on safer side i did the same changes as per getInputStream0(). Looking from out side wrapping the 'RuntimeException' into another 'RuntimeException' not make much sense.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15483#discussion_r1314601369
More information about the net-dev
mailing list