RFR: 8267140: Support closing the HttpClient by making it auto-closable [v3]

Daniel Fuchs dfuchs at openjdk.org
Mon Mar 20 13:39:46 UTC 2023


On Mon, 20 Mar 2023 13:12:03 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:

>> I have added some text to the `@apiNote` and added a link in all the `@implSpec`. Does that read better?
>
> I think this part in this method's javadoc is a bit out of place:
> 
>> It is called if the thread waiting on {@link #close()} is interrupted.
> 
> It is just one of the place from where this method will be called from. Since the `shutdownNow()` is a public API, it could be called by applications too. Perhaps we should just remove that sentence from that method's javadoc? The javadoc of `close()` explains in a better way that this `shutdownNow()` method might get invoked from within `close()`, which I think should be enough.

Right. In my first prototype I had made this method protected, until I realized it was actually better to make it public. This is a remnant of that first prototype. I will remove this sentence here, since as you noticed it's already specified at in close().

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

PR: https://git.openjdk.org/jdk/pull/13019


More information about the net-dev mailing list