Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try to remove generic on BeanInstanceSupplier #28875

Closed
snicoll opened this issue Jul 26, 2022 · 1 comment
Closed

Try to remove generic on BeanInstanceSupplier #28875

snicoll opened this issue Jul 26, 2022 · 1 comment
Labels
status: declined A suggestion or change that we don't feel we should currently apply theme: aot An issue related to Ahead-of-time processing type: enhancement A general enhancement

Comments

@snicoll
Copy link
Member

snicoll commented Jul 26, 2022

This is a follow-up of what we've discovered as part of #28748

If a BeanDefinition has a ResolvableType that contains a generic we'll generate code for the raw class. Getting generics right is going to be quite hard so we're wondering if we shouldn't attempt to make it less constrained. Removing the generic and creating the BeanInstanceSupplier in the main method would be a first good step.

The instance-specific method (if any) could then take care of the bean instantiation and any post processing that should apply, if necessary.

@snicoll snicoll added type: enhancement A general enhancement theme: aot An issue related to Ahead-of-time processing labels Jul 26, 2022
@snicoll snicoll added this to the 6.x Backlog milestone Jul 26, 2022
@snicoll
Copy link
Member Author

snicoll commented Oct 6, 2022

It turns out that trying to support reflection-based calls, adding Object and making sure that downstream suppliers (such as autowiring and such) knew about it was the most effective way to make progress. I don't think removing the generic is going to buy us much in the end.

@snicoll snicoll closed this as not planned Won't fix, can't repro, duplicate, stale Oct 6, 2022
@snicoll snicoll added the status: declined A suggestion or change that we don't feel we should currently apply label Oct 6, 2022
@snicoll snicoll removed this from the 6.x Backlog milestone Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: declined A suggestion or change that we don't feel we should currently apply theme: aot An issue related to Ahead-of-time processing type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

1 participant