RFR: 8367976: Validate and clamp jdk.httpclient.bufsize [v4]
Daniel Fuchs
dfuchs at openjdk.org
Tue Oct 21 17:56:37 UTC 2025
On Tue, 21 Oct 2025 17:48:56 GMT, Volkan Yazici <vyazici at openjdk.org> wrote:
>> test/jdk/java/net/httpclient/BufferSize1Test.java line 143:
>>
>>> 141: }
>>> 142:
>>> 143: private static final class BodyEchoingHandler implements HttpServerAdapters.HttpTestHandler {
>>
>> You could simply use / extend the HttpServerAdapters.HttpTestEchoHandler;
>> Also consider implementing HttpServerAdapters in the test class to get rid of the leading HttpServerAdapters qualifier.
>
> `HttpTestEchoHandler` is a nice tip! In 92f07382f12, employed it and along with styling changes to remove all `HttpServerAdapters` qualifiers.
>
> I'll go with importing whatever I need from `HttpServerAdapters`. I am uncomfortable with extending from `HttpServerAdapters` since its API surface is vast and certain method calls (e.g., `createClientBuilderFor()`) still must be qualified.
If you implement HttpServerAdapters which is what almost all other tests do then you can use `newClientBuilderForH3()` which is an instance method and does not need to be qualified.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27874#discussion_r2449215385
More information about the net-dev
mailing list