提交 318092cf 编写于 作者: S Sebastien Deleuze

Use Mono#defaultIfEmpty instead of Flux#defaultIfEmpty

上级 327c4204
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册