Allow null values to async handler methods
Previously when the argument contained a null value (for example for nullified continuation when using a suspend fun), it would fail to convert the arguments, because of a `NullPointerException`. By allowing the mono value be nullable it converts the arguments successfully. Closes gh-239
This commit is contained in:
@@ -96,7 +96,7 @@ public abstract class InvocableHandlerMethodSupport extends HandlerMethod {
|
||||
|
||||
List<Mono<Object>> monoList = Arrays.stream(args)
|
||||
.map(arg -> {
|
||||
Mono<Object> argMono = (arg instanceof Mono ? (Mono<Object>) arg : Mono.just(arg));
|
||||
Mono<Object> argMono = (arg instanceof Mono ? (Mono<Object>) arg : Mono.justOrEmpty(arg));
|
||||
return argMono.defaultIfEmpty(NO_VALUE);
|
||||
})
|
||||
.collect(Collectors.toList());
|
||||
|
||||
Reference in New Issue
Block a user