GH-2027 polishing

This commit is contained in:
Oleg Zhurakousky
2020-10-21 08:25:46 +02:00
parent a7d2e14e80
commit d23cb9b1fb

View File

@@ -171,6 +171,7 @@ public class FunctionConfiguration {
return new InitializingBean() {
@SuppressWarnings("rawtypes")
@Override
public void afterPropertiesSet() throws Exception {
for (BindableFunctionProxyFactory proxyFactory : proxyFactories) {
@@ -199,12 +200,18 @@ public class FunctionConfiguration {
.arrayToCommaDelimitedString(Arrays.copyOfRange(functionNames, 1, functionNames.length));
supplier = functionCatalog.lookup(supplierName);
function = functionCatalog.lookup(remainingFunctionDefinition);
function = functionCatalog.lookup(remainingFunctionDefinition, contentTypes.toArray(new String[0]));
functionWrapper = ((FunctionInvocationWrapper) function).isInputTypePublisher()
&& ((FunctionInvocationWrapper) supplier).isOutputTypePublisher()
? functionCatalog.lookup(proxyFactory.getFunctionDefinition(), contentTypes.toArray(new String[0]))
: null;
if (!((FunctionInvocationWrapper) supplier).isOutputTypePublisher() &&
((FunctionInvocationWrapper) function).isInputTypePublisher()) {
functionWrapper = null;
}
else {
functionWrapper = functionCatalog.lookup(proxyFactory.getFunctionDefinition(), contentTypes.toArray(new String[0]));
}
}
else {
functionWrapper = functionCatalog.lookup(proxyFactory.getFunctionDefinition(), contentTypes.toArray(new String[0]));
}
Publisher<Object> beginPublishingTrigger = setupBindingTrigger(context);