Avoid NPE in AutoProxyRegistrar when no attribute found
Issue: SPR-15055
This commit is contained in:
parent
7818c650ba
commit
58e113a591
|
|
@ -60,6 +60,9 @@ public class AutoProxyRegistrar implements ImportBeanDefinitionRegistrar {
|
||||||
Set<String> annoTypes = importingClassMetadata.getAnnotationTypes();
|
Set<String> annoTypes = importingClassMetadata.getAnnotationTypes();
|
||||||
for (String annoType : annoTypes) {
|
for (String annoType : annoTypes) {
|
||||||
AnnotationAttributes candidate = AnnotationConfigUtils.attributesFor(importingClassMetadata, annoType);
|
AnnotationAttributes candidate = AnnotationConfigUtils.attributesFor(importingClassMetadata, annoType);
|
||||||
|
if (candidate == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
Object mode = candidate.get("mode");
|
Object mode = candidate.get("mode");
|
||||||
Object proxyTargetClass = candidate.get("proxyTargetClass");
|
Object proxyTargetClass = candidate.get("proxyTargetClass");
|
||||||
if (mode != null && proxyTargetClass != null && AdviceMode.class == mode.getClass() &&
|
if (mode != null && proxyTargetClass != null && AdviceMode.class == mode.getClass() &&
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue