Skip to content

BeanFactoryAwareFunctionRegistry. lookup(...):129 shows false positive warning when "functionalBeans" is empty #1011

Description

@javierddn

Hi there,

Trying to clean up warning messages from my project I have realized that BeanFactoryAwareFunctionRegistry has an issue with a false positive, where log output shows below warning message:
Multiple functional beans were found [], thus can't determine default function definition. Please use 'spring.cloud.function.definition' property to explicitly define it.

The issue is at:
class: BeanFactoryAwareFunctionRegistry
method: public T lookup(Class<?> type, String functionDefinition, String... expectedOutputMimeTypes) {
line: 129
code fragment/solution: logger.warn should check if 'functionalBeans' is empty before logging it.

https://github.com/spring-cloud/spring-cloud-function/blob/main/spring-cloud-function-context/src/main/java/org/springframework/cloud/function/context/catalog/BeanFactoryAwareFunctionRegistry.java#L129

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions