ultimateTargetClass falls back to raw class instead of returning null

This commit is contained in:
Juergen Hoeller 2010-07-30 15:13:38 +00:00
parent faad0f4bb1
commit 061af2f25f
1 changed files with 4 additions and 0 deletions

View File

@ -21,6 +21,7 @@ import java.util.Arrays;
import org.springframework.aop.SpringProxy;
import org.springframework.aop.TargetClassAware;
import org.springframework.aop.TargetSource;
import org.springframework.aop.support.AopUtils;
import org.springframework.aop.target.SingletonTargetSource;
import org.springframework.util.Assert;
@ -62,6 +63,9 @@ public abstract class AopProxyUtils {
}
current = nested;
}
if (result == null) {
result = (AopUtils.isCglibProxy(candidate) ? candidate.getClass().getSuperclass() : candidate.getClass());
}
return result;
}