Add null check for function registration in composite
This commit is contained in:
@@ -315,18 +315,20 @@ public abstract class AbstractComposableFunctionRegistry implements FunctionRegi
|
|||||||
FunctionRegistration<?> composedRegistration = composableFunctions
|
FunctionRegistration<?> composedRegistration = composableFunctions
|
||||||
.stream().reduce((a, z) -> composeFunctions(a, z))
|
.stream().reduce((a, z) -> composeFunctions(a, z))
|
||||||
.orElseGet(() -> null);
|
.orElseGet(() -> null);
|
||||||
composedFunction = composedRegistration.getTarget();
|
if (composedRegistration != null) {
|
||||||
if (composedFunction != null && !this.types.containsKey(name)) {
|
composedFunction = composedRegistration.getTarget();
|
||||||
this.addType(name, composedRegistration.getType());
|
if (composedFunction != null && !this.types.containsKey(name)) {
|
||||||
this.addName(composedFunction, name);
|
this.addType(name, composedRegistration.getType());
|
||||||
if (composedFunction instanceof Function) {
|
this.addName(composedFunction, name);
|
||||||
this.addFunction(name, (Function<?, ?>) composedFunction);
|
if (composedFunction instanceof Function) {
|
||||||
}
|
this.addFunction(name, (Function<?, ?>) composedFunction);
|
||||||
else if (composedFunction instanceof Consumer) {
|
}
|
||||||
this.addConsumer(name, (Consumer<?>) composedFunction);
|
else if (composedFunction instanceof Consumer) {
|
||||||
}
|
this.addConsumer(name, (Consumer<?>) composedFunction);
|
||||||
else if (composedFunction instanceof Supplier) {
|
}
|
||||||
this.addSupplier(name, (Supplier<?>) composedFunction);
|
else if (composedFunction instanceof Supplier) {
|
||||||
|
this.addSupplier(name, (Supplier<?>) composedFunction);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user