diff --git a/core/src/main/java/org/springframework/security/access/method/AbstractMethodSecurityMetadataSource.java b/core/src/main/java/org/springframework/security/access/method/AbstractMethodSecurityMetadataSource.java index a8429e617e..06f700506b 100644 --- a/core/src/main/java/org/springframework/security/access/method/AbstractMethodSecurityMetadataSource.java +++ b/core/src/main/java/org/springframework/security/access/method/AbstractMethodSecurityMetadataSource.java @@ -22,7 +22,6 @@ import org.aopalliance.intercept.MethodInvocation; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.aop.framework.AopProxyUtils; -import org.springframework.aop.target.EmptyTargetSource; import org.springframework.security.access.ConfigAttribute; /** @@ -46,7 +45,7 @@ public abstract class AbstractMethodSecurityMetadataSource implements Object target = mi.getThis(); Class targetClass = null; - if (target != null && target != EmptyTargetSource.INSTANCE.getTarget()) { + if (target != null) { targetClass = target instanceof Class ? (Class) target : AopProxyUtils.ultimateTargetClass(target); }