JDK-8204679 : HTTP Client refresh
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 11
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2018-06-11
  • Updated: 2020-12-03
  • Resolved: 2018-06-20
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11
11 b19Fixed
Related Reports
CSR :  
Relates :  
Relates :  
Relates :  
Description
1) Make HttpHeaders final
   The abstract HttpHeader class has been made final, with a factory method for its construction. By eliminating a narrow, likely uncommon performance optimization possibility, it has been possible to make HttpHeaders final.

2) Dependent tasks run in the common pool
    The default execution of dependent tasks has been updated to run in the same executor as that of CompletableFuture's defaultExecutor. This is more familiar to developers that already use CF, and reduces the likelihood of the HTTP Client being starved of threads to execute its tasks. This is just default behaviour, both the HTTP Client and CompletableFuture allow more fine-grain control, if needed.

3) More descriptive error messages have been added when a server misbehaves.

4) The synchronous send method error handling has been updated to rethrow exceptions, therefore including the invoking thread's stack in the exception stack trace.

5) The immutable flow of response body data has been made an implementation detail, rather than part of the normative specification. This allows for a more performance focused implementation by making it possible to access the byte buffers backing bytes directly.