Introduce getAnnotationAttributes(..,Class) in AnnoElUtils

This commit is contained in:
Sam Brannen
2015-05-29 21:36:00 +02:00
parent 46be176875
commit 9afcd17c71
5 changed files with 38 additions and 19 deletions

View File

@@ -442,9 +442,9 @@ public class AutowiredAnnotationBeanPostProcessor extends InstantiationAwareBean
private AnnotationAttributes findAutowiredAnnotation(AccessibleObject ao) {
for (Class<? extends Annotation> type : this.autowiredAnnotationTypes) {
AnnotationAttributes ann = AnnotatedElementUtils.getAnnotationAttributes(ao, type.getName());
if (ann != null) {
return ann;
AnnotationAttributes attributes = AnnotatedElementUtils.getAnnotationAttributes(ao, type);
if (attributes != null) {
return attributes;
}
}
return null;