lhbaccount opened SPR-15855 and commented
GenericTypeAwareAutowireCandidateResolver doesn't work with generic covariance
Affects: 4.3.10
Comment From: spring-projects-issues
Juergen Hoeller commented
Could you sketch a sample here? Just wondering what kind of covariance you would be using...
Comment From: spring-projects-issues
lhbaccount commented
https://github.com/sl-wxx/spring-framework-issues/tree/master/SPR-15855
This is a sample.
Comment From: spring-projects-issues
Yanming Zhou commented
Java doesn't supports such generic covariance
List<java.lang.reflect.Executable> list = new ArrayList<java.lang.reflect.Method>(); //compile error
Comment From: spring-projects-issues
Juergen Hoeller commented
We're strictly following Java semantics there, so indeed: If the corresponding assignment is rejected by the Java compiler, it will have to be rejected by Spring's type matching as well.