RFR: 8369595: HttpClient: HttpHeaders.firstValueAsLong failures should be converted to ProtocolException [v2]
Daniel Fuchs
dfuchs at openjdk.org
Tue Nov 25 13:14:39 UTC 2025
On Tue, 25 Nov 2025 10:59:10 GMT, Daniel Jeliński <djelinski at openjdk.org> wrote:
>> Volkan Yazici has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Address review remarks
>
> src/java.net.http/share/classes/jdk/internal/net/http/Http1Response.java line 338:
>
>> 336: // expect-continue reads headers and body twice.
>> 337: // if we reach here, we must reset the headersReader state.
>> 338: finally {
>
> Is this `finally` necessary? The `ProtocolException` is supposed to kill the connection anyway, so its internal state shouldn't matter much.
>
> If it does matter, please move the `finally` to the closing brace of the `catch`; it looks odd now.
Agreed.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28431#discussion_r2559891925
More information about the net-dev
mailing list