Skip to content

Meta-annotations are unnecessarily synthesized in MergedAnotations #28704

@sbrannen

Description

@sbrannen

While analyzing the claim in #28702, I discovered that meta-annotations are unnecessarily synthesized when attempting to synthesize a MergedAnnotation retrieved via the MergedAnnotations.from(AnnotatedElement, ...).get(<annotationType>) API.

This is a regression in our merged annotation support introduced when the MergedAnnotations API replaced our previous support, and the source of the bug is the logic in TypeMappedAnnotation#createSynthesized().

In theory, I could have detected this regression earlier when I had to change a test in BootstrapUtilsTests (see commit ce87285), since @BootstrapWith should never have been synthesized; however, I overlooked that detail at the time.

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)theme: aotAn issue related to Ahead-of-time processingtype: regressionA bug that is also a regression

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions