GH-668 Initial NPE fix in RequestProcessor when no path argument provided

This commit is contained in:
Oleg Zhurakousky
2021-03-25 14:28:18 +01:00
parent 9ae7df586c
commit eb319e525a

View File

@@ -277,9 +277,14 @@ public class RequestProcessor {
}
private Publisher<?> invokeFunction(FunctionWrapper wrapper) {
Flux<?> input = Flux.from(wrapper.argument);
Object result = FunctionWebUtils.invokeFunction(wrapper.function, input, wrapper.function.isInputTypeMessage());
return Mono.from((Publisher<?>) result);
if (wrapper.argument != null) {
Flux<?> input = Flux.from(wrapper.argument);
Object result = FunctionWebUtils.invokeFunction(wrapper.function, input, wrapper.function.isInputTypeMessage());
return Mono.from((Publisher<?>) result);
}
else {
return Mono.empty();
}
}
/**