Skip to content

Avoid early getMostSpecificMethod resolution in CommonAnnotationBeanPostProcessor #31967

Closed
@jhoeller

Description

@jhoeller

In the course of #21843, it turns out that CommonAnnotationBeanPostProcessor uses an inverted loop where ClassUtils.getMostSpecificMethod is called at the outer level before actually finding an annotation, whereas AutowiredAnnotationBeanPostProcessor only calls ClassUtils.getMostSpecificMethod for actually annotated methods. Aligning CABPP with AABPP in that respect can avoid significant overhead on startup.

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