Use Mono#defaultIfEmpty instead of Flux#defaultIfEmpty

This commit is contained in:
Sebastien Deleuze 2016-01-07 15:58:46 +01:00
parent 327c420409
commit 318092cfd0
1 changed files with 1 additions and 2 deletions

View File

@ -132,8 +132,7 @@ public class InvocableHandlerMethod extends HandlerMethod {
.orElseThrow(() -> getArgError("No resolver for ", parameter, null));
try {
return resolver.resolveArgument(parameter, request)
// TODO Add a defaultIfEmpty alias to Mono to avoid conversion to Flux
.flux().defaultIfEmpty(NO_VALUE).next()
.defaultIfEmpty(NO_VALUE)
.otherwise(ex -> Mono.error(getArgError("Error resolving ", parameter, ex)));
}
catch (Exception ex) {