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.
Comment From: snicoll
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.