From 061af2f25f94826c5d59f777dbac970ff51ef7c6 Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Fri, 30 Jul 2010 15:13:38 +0000 Subject: [PATCH] ultimateTargetClass falls back to raw class instead of returning null --- .../java/org/springframework/aop/framework/AopProxyUtils.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/org.springframework.aop/src/main/java/org/springframework/aop/framework/AopProxyUtils.java b/org.springframework.aop/src/main/java/org/springframework/aop/framework/AopProxyUtils.java index 5325014382..28e48adb4f 100644 --- a/org.springframework.aop/src/main/java/org/springframework/aop/framework/AopProxyUtils.java +++ b/org.springframework.aop/src/main/java/org/springframework/aop/framework/AopProxyUtils.java @@ -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; }