Closed
Description
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