Fix/optimize handling of @Bean method override regression with return type narrowing on JDK 8 [SPR-11718] #16340
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
status: backported
An issue that has been backported to maintenance branches
type: enhancement
A general enhancement
Milestone
Oliver Drotbohm opened SPR-11718 and commented
Overriding an
@Bean
method with a narrowed return type is working fine with Spring 3.2.8 on legacy JDKs (6 and 7). However, it's breaking with Spring 3.2.8 on JDK 8. Spring 4.0 on JDK 8 fixes this already, as part of general@Bean
overload support. For Spring 3.2.9, we should do a minimal fix for the regression on JDK 8, even if we're not allowing overloaded@Bean
methods in the same class yet.Affects: 3.2.8
Issue Links:
Backported to: 3.2.9
The text was updated successfully, but these errors were encountered: