-
Enhancement
-
Resolution: Fixed
-
P3
-
None
-
b16
The HttpClient class level java doc has an API note about closing a client and reclaiming resource. There should also be an implementation note documenting what happens when a client is garbage collected without being explicitly closed.
In particular, it may not be obvious that an InputStream always need to be closed, which requires to always call HttpResponse::body() when the body is an InputStream.
At a minimum, the various BodyHandlers and BodySubscriber whose body need to be closed should link to the API/implementation note in the HttpClient class level documentation.
In particular, it may not be obvious that an InputStream always need to be closed, which requires to always call HttpResponse::body() when the body is an InputStream.
At a minimum, the various BodyHandlers and BodySubscriber whose body need to be closed should link to the API/implementation note in the HttpClient class level documentation.
- csr for
-
JDK-8328100 Improve HttpClient documentation with regard to reclaiming resources
-
- Closed
-
- relates to
-
JDK-8308691 HttpClient: find a way to promote autoclosing of streaming bodies created by BodyHandlers
-
- Open
-