Skip to content
This repository has been archived by the owner on Feb 23, 2023. It is now read-only.

BeanInstanceExecutableSupplier does not detect factory method when target type is set to the type it produces #1269

Closed
snicoll opened this issue Nov 17, 2021 · 0 comments
Assignees
Labels
type: bug A general bug
Milestone

Comments

@snicoll
Copy link
Contributor

snicoll commented Nov 17, 2021

Consider the following example:

public MyFactory {

    public static MyBean createBean(MyParam) {
    }
}

And a BeanDefinition where the target type is set to MyBean with a beanClass set to MyFactory. The algorithm currently uses the target type as the primary candidate, falling back to the beanClass if necessary.

In the case of a factory method, this is wrong and we should improve the logic to consider the beanClass use case.

@snicoll snicoll added type: bug A general bug theme: aot labels Nov 17, 2021
@snicoll snicoll added this to the 0.11.0-RC1 milestone Nov 17, 2021
@snicoll snicoll self-assigned this Nov 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug A general bug
Development

No branches or pull requests

1 participant