Avoid early getMostSpecificMethod resolution in CommonAnnotationBeanPostProcessor #31967
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
In the course of #21843, it turns out that
CommonAnnotationBeanPostProcessor
uses an inverted loop whereClassUtils.getMostSpecificMethod
is called at the outer level before actually finding an annotation, whereasAutowiredAnnotationBeanPostProcessor
only callsClassUtils.getMostSpecificMethod
for actually annotated methods. Aligning CABPP with AABPP in that respect can avoid significant overhead on startup.The text was updated successfully, but these errors were encountered: