Skip to content

Annotations on superclasses are detected by StandardAnnotationMetadata [SPR-11595] #16219

Closed
@spring-projects-issues

Description

@spring-projects-issues

Phil Webb opened SPR-11595 and commented

Background

The StandardAnnotationMetadata class in Spring Framework 4.0.2 returns false for isAnnotated when a class is not directly annotated with an annotation (even if the annotation is present on a superclass). Furthermore, getAnnotationAttributes and getAllAnnotationAttributes return null when querying for the same annotation.


Analysis

The fix for #16100 changed this logic and is causing problems with Spring Boot conditions. Specifically, @Conditional annotations were never previously considered on super classes (see #15466).


Affects: 4.0.3

Issue Links:

Referenced from: commits a2f1169

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: regressionA bug that is also a regression

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions