RFR: 8326498: java.net.http.HttpClient connection leak using http/2 [v11]

Jaikiran Pai jpai at openjdk.org
Mon Nov 24 10:17:17 UTC 2025


On Mon, 24 Nov 2025 09:59:12 GMT, Daniel Jeliński <djelinski at openjdk.org> wrote:

>> Jaikiran Pai has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   use ClosedChannelException instead of IOException
>
> test/jdk/java/net/httpclient/http2/BurstyRequestsTest.java line 128:
> 
>> 126:             final Set<?> openedConnections = HttpClientImplAccess.getOpenedConnections(client);
>> 127:             assumeTrue(openedConnections != null,
>> 128:                     "skipping test against HttpClient of type " + client.getClass().getName());
> 
> Please remove. The HttpClient will always be of the expected type, and keeping this code around will only make it harder to spot when the assumption no longer holds.

Hello Daniel, my understanding is that the `HttpClient` default implementation in the JDK will be `jdk.internal.net.http.HttpClientImpl`, but if these tests are run against any other implementation of the `HttpClient` then this test is going to fail to find that internal state. If that isn't a practical concern, then I will go ahead and remove this skipping of the test.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28233#discussion_r2555591315


More information about the net-dev mailing list