Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8245462 HttpClient send throws InterruptedException when interrupted but does not cancel request
  3. JDK-8252515

Release Note: The Default HttpClient Implementation Returns Cancelable Futures

    XMLWordPrintable

Details

    • Sub-task
    • Status: Closed
    • P3
    • Resolution: Delivered
    • 16
    • 16
    • core-libs
    • Verified

    Description

      In this release, the default `HttpClient` returns *cancelable* futures.

      The default `HttpClient` is created by a call to `HttpClient.newHttpClient()`, or by invoking the `build` method on builders returned by `HttpClient.newBuilder()`.
      The implementation of the `sendAsync` methods in the default `HttpClient` now return `CompletableFuture` objects that are *cancelable*.
      Invoking `cancel(true)` on a *cancelable* future that is not completed, attempts to cancel the HTTP exchange in an effort to release underlying resources as soon as possible. More information can be obtained by reading the API documentation of the `HttpClient::sendAsync` methods.

      Attachments

        Activity

          People

            dfuchs Daniel Fuchs
            dfuchs Daniel Fuchs
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: