Closed
Description
For my example, let's take a look at ElasticsearchAsyncClient#index
:
public <TDocument> CompletableFuture<IndexResponse> index(IndexRequest<TDocument> request)
throws IOException, ElasticsearchException {
@SuppressWarnings("unchecked")
JsonEndpoint<IndexRequest<?>, IndexResponse, ErrorResponse> endpoint = (JsonEndpoint<IndexRequest<?>, IndexResponse, ErrorResponse>) IndexRequest._ENDPOINT;
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}
Is it true that this method can actually throw an IOException? I'd expect that the CompletableFuture
might return a failure (essentially wrapping the exception), but it's not actually throwing said exception. Am I missing some other checked IOException
further down in the call chain? In the above example, RestClientTransport#performRequestAsync
doesn't throw an IOException
.