Browse Source

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

pull/23217/head
Juergen Hoeller 15 years ago
parent
commit
a06adf7203
  1. 5
      org.springframework.core/src/test/java/org/springframework/core/type/AnnotationMetadataTests.java

5
org.springframework.core/src/test/java/org/springframework/core/type/AnnotationMetadataTests.java

@ -79,8 +79,11 @@ public class AnnotationMetadataTests extends TestCase { @@ -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) {

Loading…
Cancel
Save