-
Sub-task
-
Resolution: Delivered
-
P4
-
16
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.
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.