From a06adf7203a5f95fc77aab58fb1ef39f3e2251b7 Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Wed, 11 Nov 2009 19:24:43 +0000 Subject: [PATCH] AnnotationMetadata returns Class values by default (again), allowing for explicit retrieval of String class names where preferred (SPR-5827) --- .../springframework/core/type/AnnotationMetadataTests.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/org.springframework.core/src/test/java/org/springframework/core/type/AnnotationMetadataTests.java b/org.springframework.core/src/test/java/org/springframework/core/type/AnnotationMetadataTests.java index b41fecba7a..952b565be0 100644 --- a/org.springframework.core/src/test/java/org/springframework/core/type/AnnotationMetadataTests.java +++ b/org.springframework.core/src/test/java/org/springframework/core/type/AnnotationMetadataTests.java @@ -79,8 +79,11 @@ public class AnnotationMetadataTests extends TestCase { assertEquals("myScope", scopeAttrs.get("value")); Map specialAttrs = metadata.getAnnotationAttributes(SpecialAttr.class.getName()); assertEquals(2, specialAttrs.size()); - assertEquals(String.class.getName(), specialAttrs.get("clazz")); + assertEquals(String.class, specialAttrs.get("clazz")); assertEquals(Thread.State.NEW, specialAttrs.get("state")); + Map specialAttrsString = metadata.getAnnotationAttributes(SpecialAttr.class.getName(), true); + assertEquals(String.class.getName(), specialAttrsString .get("clazz")); + assertEquals(Thread.State.NEW, specialAttrsString.get("state")); } private void doTestMethodAnnotationInfo(AnnotationMetadata classMetadata) {