mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-10-08 08:09:09 +00:00
StandardRepeatableContainers.computeRepeatedAnnotationsMethod() previously treated any annotation as a container annotation if it merely declared a `value` attribute returning an array of a @Repeatable annotated type, without verifying that the repeatable annotation actually references the candidate container via @Repeatable.value(). Consequently, an unrelated annotation that happened to have the same shape as the official container (e.g. a "fake" container with a `value` attribute returning the same repeatable type) was incorrectly recognized as a container. This commit aligns the detection logic with the Java language semantics by additionally asserting that the container type declared in @Repeatable.value() is identical to the candidate annotation type. Closes gh-37326 Signed-off-by: Chengang Guan <guanchengang@qq.com>