Skip to content

Nested arrays of annotations are synthesized with wrong component type [SPR-13077] #17669

@spring-projects-issues

Description

@spring-projects-issues

Sam Brannen opened SPR-13077 and commented

Status Quo

The support for synthesizing annotations that was introduced in #16137 and #16138 incorrectly adapts a nested array of annotations by converting it to an array of generic annotations (i.e., Annotation[]). This improper behavior can lead to unexpected exceptions at run time -- for example, Annotation[] is not compatible with Filter[].

The broken code resides in AnnotationUtils.adaptValue().

Deliverables

  1. Ensure that nested arrays of synthesized annotations are created with the appropriate component type.

Affects: 4.2 RC1

Referenced from: commits f41de12

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions