ReflectionUtils.USER_DECLARED_METHODS does not filter methods declared in java.lang.Object #27970
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: regression
A bug that is also a regression
Milestone
When I saw the AOP source code, I found that the
getAdvisorMethods
method inReflectiveAspectJAdvisorFactory
introspects the methods ofObject
, and I am confused about this.The sample as follow,
When a superclass is
Object
, it continues recursively, because inReflectiveAspectJAdvisorFactory.adviceMethodFilter
themf = ReflectionUtils.USER_DECLARED_METHODS.and(method -> (AnnotationUtils.getAnnotation(method, Pointcut.class) == null))
.The source code position:
https://github.com/spring-projects/spring-framework/blob/main/spring-core/src/main/java/org/springframework/util/ReflectionUtils.java#L369
The text was updated successfully, but these errors were encountered: