From 1ead8bf1ab741ed09bed17bbc34041d4f506ad11 Mon Sep 17 00:00:00 2001 From: Sam Brannen <104798+sbrannen@users.noreply.github.com> Date: Thu, 2 Apr 2026 18:39:37 +0200 Subject: [PATCH] Polishing --- .../annotation/AnnotationBeanNameGeneratorTests.java | 2 +- .../core/annotation/TypeMappedAnnotationTests.java | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/spring-context/src/test/java/org/springframework/context/annotation/AnnotationBeanNameGeneratorTests.java b/spring-context/src/test/java/org/springframework/context/annotation/AnnotationBeanNameGeneratorTests.java index d312a3f9569..e7f0f46a4bb 100644 --- a/spring-context/src/test/java/org/springframework/context/annotation/AnnotationBeanNameGeneratorTests.java +++ b/spring-context/src/test/java/org/springframework/context/annotation/AnnotationBeanNameGeneratorTests.java @@ -96,7 +96,7 @@ class AnnotationBeanNameGeneratorTests { "myComponent", "myService"); } - @Test // gh-gh-36524 + @Test // gh-36524 void generateBeanNameForConventionBasedComponentWithMissingAnnotationAttributeTypeViaAsm() throws Exception { FilteringClassLoader classLoader = new FilteringClassLoader(getClass().getClassLoader()); MetadataReaderFactory readerFactory = new SimpleMetadataReaderFactory(classLoader); diff --git a/spring-core/src/test/java/org/springframework/core/annotation/TypeMappedAnnotationTests.java b/spring-core/src/test/java/org/springframework/core/annotation/TypeMappedAnnotationTests.java index 4ae1cf65065..2e61f557078 100644 --- a/spring-core/src/test/java/org/springframework/core/annotation/TypeMappedAnnotationTests.java +++ b/spring-core/src/test/java/org/springframework/core/annotation/TypeMappedAnnotationTests.java @@ -103,10 +103,10 @@ class TypeMappedAnnotationTests { @Test void adaptFromNestedMergedAnnotation() { - MergedAnnotation nested = MergedAnnotation.of(Nested.class); + MergedAnnotation nested = MergedAnnotation.of(NestedAnnotation.class); MergedAnnotation annotation = TypeMappedAnnotation.of(null, null, NestedContainer.class, Collections.singletonMap("value", nested)); - assertThat(annotation.getAnnotation("value", Nested.class)).isSameAs(nested); + assertThat(annotation.getAnnotation("value", NestedAnnotation.class)).isSameAs(nested); } @Test @@ -152,6 +152,7 @@ class TypeMappedAnnotationTests { "No mapping from " + annotation + " to " + mappedAnnotationType); } + @Retention(RetentionPolicy.RUNTIME) @interface ExplicitMirror { @@ -247,11 +248,11 @@ class TypeMappedAnnotationTests { @Retention(RetentionPolicy.RUNTIME) @interface NestedContainer { - Nested value(); + NestedAnnotation value(); } @Retention(RetentionPolicy.RUNTIME) - @interface Nested { + @interface NestedAnnotation { String value() default ""; }