Add support for resolving multiple bounds in type variables #22902
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: enhancement
A general enhancement
Milestone
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 toorg.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
The text was updated successfully, but these errors were encountered: