AnnotationMetadata returns Class values by default (again), allowing for explicit retrieval of String class names where preferred (SPR-5827)

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@2346 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
Juergen Hoeller 2009-11-11 19:24:43 +00:00
parent c1ff125fb8
commit 9d14faa676
1 changed files with 4 additions and 1 deletions

View File

@ -79,8 +79,11 @@ public class AnnotationMetadataTests extends TestCase {
assertEquals("myScope", scopeAttrs.get("value"));
Map<String, Object> 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<String, Object> 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) {