소스 검색

Work Around SPR-15651

Issue gh-4386
Rob Winch 8 년 전
부모
커밋
6c286696b4
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      core/src/main/java/org/springframework/security/access/method/AbstractMethodSecurityMetadataSource.java

+ 2 - 1
core/src/main/java/org/springframework/security/access/method/AbstractMethodSecurityMetadataSource.java

@@ -22,6 +22,7 @@ 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;
 
 /**
@@ -45,7 +46,7 @@ public abstract class AbstractMethodSecurityMetadataSource implements
 			Object target = mi.getThis();
 			Class<?> targetClass = null;
 
-			if (target != null) {
+			if (target != null && target != EmptyTargetSource.INSTANCE.getTarget()) {
 				targetClass = target instanceof Class<?> ? (Class<?>) target
 						: AopProxyUtils.ultimateTargetClass(target);
 			}