GH-1117 Enhance support for function composition to handle null returns

Resolves #1117
This commit is contained in:
Oleg Zhurakousky
2024-03-27 19:05:21 +01:00
parent 8745f32ac2
commit d70079eb4d
2 changed files with 30 additions and 1 deletions

View File

@@ -725,7 +725,7 @@ public class SimpleFunctionRegistry implements FunctionRegistry {
input = this.fluxifyInputIfNecessary(input);
Object convertedInput = this.convertInputIfNecessary(input, this.inputType);
Object convertedInput = input == null ? null : this.convertInputIfNecessary(input, this.inputType);
if (this.isRoutingFunction() || this.isComposed()) {
result = ((Function) this.target).apply(convertedInput);