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