Fix the implicit composition logic in BeanFactoryAwareFunctionRegistry

This commit is contained in:
Oleg Zhurakousky
2020-04-17 09:56:47 +02:00
parent ab68cb58e9
commit 2fa75594a3

View File

@@ -173,7 +173,11 @@ public class BeanFactoryAwareFunctionRegistry extends SimpleFunctionRegistry imp
.concat(Stream.of(functionNames), Stream.concat(Stream.of(consumerNames), Stream.of(supplierNames))) .concat(Stream.of(functionNames), Stream.concat(Stream.of(consumerNames), Stream.of(supplierNames)))
.collect(Collectors.toList()); .collect(Collectors.toList());
if (!ObjectUtils.isEmpty(names)) { if (definition.endsWith("|")) {
Set<String> fNames = this.getNames(null);
definition = this.determinImpliedDefinition(fNames, definition);
}
else if (!ObjectUtils.isEmpty(names)) {
if (names.size() > 1) { if (names.size() > 1) {
logger.info("Found more then one function beans in BeanFactory: " + names logger.info("Found more then one function beans in BeanFactory: " + names
+ ". If you did not intend to use functions, ignore this message. However, if you did " + ". If you did not intend to use functions, ignore this message. However, if you did "
@@ -184,10 +188,6 @@ public class BeanFactoryAwareFunctionRegistry extends SimpleFunctionRegistry imp
} }
definition = names.get(0); definition = names.get(0);
} }
else if (definition.endsWith("|")) {
Set<String> fNames = this.getNames(null);
definition = this.determinImpliedDefinition(fNames, definition);
}
else { else {
definition = this.discoverDefaultDefinitionFromRegistration(); definition = this.discoverDefaultDefinitionFromRegistration();
} }