On Wed, 23 Apr 2025 14:47:40 GMT, Volkan Yazici <vyaz...@openjdk.org> wrote:

>> test/jdk/java/net/httpclient/lib/jdk/httpclient/test/lib/common/HttpServerAdapters.java
>>  line 789:
>> 
>>> 787:             stop();
>>> 788:         }
>>> 789: 
>> 
>> The Http2TestServer is itself closeable, so you should override this method 
>> in Http2TestServerImpl below to call `impl.close()`.
>
> 1. What is wrong with `HttpTestServer::close` calling `HttpTestServer::stop`, 
> which is already implemented as `impl.close()` by `Http2TestServerImpl`?
> 2. Shouldn't we better remove `implements AutoCloseable` and `close()` from 
> `Http2TestServerImpl`?

1. If the impl is AutoCloseable then close() should call close().
2. I would actually prefer to make all implementations AutoCloseable, but 
that's not the point of this PR.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24822#discussion_r2056259386

Reply via email to