Skip to content

Fix/optimize handling of @Bean method override regression with return type narrowing on JDK 8 [SPR-11718] #16340

Closed
@spring-projects-issues

Description

@spring-projects-issues

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

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)status: backportedAn issue that has been backported to maintenance branchestype: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions