Affects: 5.1.6 , and I believe any previous

Autowired list of beans with multiple bounds generics may result in ClassCastException in the runtime due to org.springframework.core.ResolvableType::resolveBounds taking only the first (return bounds[0]) bound into the account.

Here is the minimal reproducible example: https://github.com/d-roenko/multiple-bounds-generics/blob/03a9aad3040d69c3073510664dfb6a9bdc007cdb/src/main/java/com/example/demo/DemoApplication.java


Comment From: snicoll

Indeed, ResolvableType does not support mutiple bounds generics at this time so we'll have to investigate how we can support that.

Comment From: jhoeller

This turns out to be rather involved but go nicely together with #30079 and #20727, even addressing the regressions in #32327 in a cleaner fashion now.