Sync with reactor-core when() -> zip() change

This commit is contained in:
Sebastien Deleuze
2017-08-21 19:54:08 +02:00
parent 9341955107
commit 9abe77670c
4 changed files with 4 additions and 4 deletions

View File

@@ -97,7 +97,7 @@ public class WebExchangeDataBinder extends WebDataBinder {
Mono<MultiValueMap<String, String>> formData = exchange.getFormData();
Mono<MultiValueMap<String, Part>> multipartData = exchange.getMultipartData();
return Mono.when(Mono.just(queryParams), formData, multipartData)
return Mono.zip(Mono.just(queryParams), formData, multipartData)
.map(tuple -> {
Map<String, Object> result = new TreeMap<>();
tuple.getT1().forEach((key, values) -> addBindValue(result, key, values));

View File

@@ -154,7 +154,7 @@ public class InvocableHandlerMethod extends HandlerMethod {
.collect(Collectors.toList());
// Create Mono with array of resolved values...
return Mono.when(argMonos, argValues ->
return Mono.zip(argMonos, argValues ->
Stream.of(argValues).map(o -> o != NO_ARG_VALUE ? o : null).toArray());
}
catch (Throwable ex) {

View File

@@ -73,7 +73,7 @@ class ModelInitializer {
List<Mono<HandlerResult>> resultList = new ArrayList<>();
attributeMethods.forEach(invocable -> resultList.add(invocable.invoke(exchange, bindingContext)));
return Mono.when(resultList, objectArray -> {
return Mono.zip(resultList, objectArray -> {
return Arrays.stream(objectArray)
.map(object -> (HandlerResult) object)
.map(handlerResult -> handleResult(handlerResult, bindingContext))

View File

@@ -235,7 +235,7 @@ public abstract class AbstractView implements View, ApplicationContextAware {
return Mono.empty();
}
return Mono.when(valueMonos,
return Mono.zip(valueMonos,
values -> {
for (int i=0; i < values.length; i++) {
if (values[i] != NO_VALUE) {