mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-07-10 04:13:31 +00:00
Work Around SPR-15651
Issue gh-4386
This commit is contained in:
parent
337317a060
commit
6c286696b4
@ -22,6 +22,7 @@ import org.aopalliance.intercept.MethodInvocation;
|
|||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
import org.springframework.aop.framework.AopProxyUtils;
|
import org.springframework.aop.framework.AopProxyUtils;
|
||||||
|
import org.springframework.aop.target.EmptyTargetSource;
|
||||||
import org.springframework.security.access.ConfigAttribute;
|
import org.springframework.security.access.ConfigAttribute;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -45,7 +46,7 @@ public abstract class AbstractMethodSecurityMetadataSource implements
|
|||||||
Object target = mi.getThis();
|
Object target = mi.getThis();
|
||||||
Class<?> targetClass = null;
|
Class<?> targetClass = null;
|
||||||
|
|
||||||
if (target != null) {
|
if (target != null && target != EmptyTargetSource.INSTANCE.getTarget()) {
|
||||||
targetClass = target instanceof Class<?> ? (Class<?>) target
|
targetClass = target instanceof Class<?> ? (Class<?>) target
|
||||||
: AopProxyUtils.ultimateTargetClass(target);
|
: AopProxyUtils.ultimateTargetClass(target);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user