spring-framework icon indicating copy to clipboard operation
spring-framework copied to clipboard

Try to remove generic on BeanInstanceSupplier

Open snicoll opened this issue 1 year ago • 0 comments

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 avatar Jul 26 '22 12:07 snicoll