Release Note: HttpClient.newHttpClient and HttpClient.Builder.build Might Throw UncheckedIOException

XMLWordPrintable

    • Type: Sub-task
    • Resolution: Delivered
    • Priority: P4
    • 16
    • Affects Version/s: 16
    • Component/s: core-libs
    • 15
    • Verified

      Creation of an instance of `java.net.http.HttpClient` may fail with `UncheckedIOException` if the underlying resources required by the implementation cannot be allocated.

      Typically, this may happen if the underlying resources required to opening a `java.nio.channels.Selector` are not available. In this case `Selector.open()` will throw an `IOException` which the default implementation of `java.net.http.HttpClient` will wrap in an `UncheckedIOException`. The API documentation of `HttpClient.newHttpClient()` and `HttpClient.newBuilder().build()` have been updated to specify that `UncheckedIOException` may be thrown if the underlying resources required by the implementation cannot be allocated. Prior to this change, an undocumented `InternalError` would have been thrown.

       

            Assignee:
            Rahul Yadav
            Reporter:
            Rahul Yadav
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: