DATAES-945 - Compilation error on JDK11+.

Original PR: #533
This commit is contained in:
Peter-Josef Meisch 2020-10-08 07:40:23 +02:00 committed by GitHub
parent 4a25d3463b
commit 49068b4e00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -611,8 +611,11 @@ public class DefaultReactiveElasticsearchClient implements ReactiveElasticsearch
String logId = ClientLogger.newLogId();
return Flux.from(execute(webClient -> sendRequest(webClient, logId, request, headers)
.exchangeToMono(clientResponse -> Mono.from(readResponseBody(logId, request, clientResponse, responseType)))));
return Flux
.from(execute(webClient -> sendRequest(webClient, logId, request, headers).exchangeToMono(clientResponse -> {
Publisher<? extends Resp> publisher = readResponseBody(logId, request, clientResponse, responseType);
return Mono.from(publisher);
})));
}
private RequestBodySpec sendRequest(WebClient webClient, String logId, Request request, HttpHeaders headers) {