Skip to content

Ambiguous check only applied to constructors #28154

@snicoll

Description

@snicoll

When a constructor should be invoked to create a bean instance, there is the danger that several flavors exist with different parameter types so that the call to new MyBean(attributes.get(0) is ambiguous as the type is not declared.

There is an explicit check for this case where an explicit type-based method on InjectedElementAttributes is used. Unfortunately, it hasn't been applied to factory methods that suffer from the same problem if several methods have a similar signature.

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)theme: aotAn issue related to Ahead-of-time processingtype: taskA general task

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions