@@ -54,8 +54,6 @@ public class ProxyUtil {
5454 CACHE_MAX_SIZE , OgnlCacheFactory .CacheType .WTLFU , CACHE_INITIAL_CAPACITY ).buildOgnlCache ();
5555 private static final OgnlCache <Member , Boolean > isProxyMemberCache = new DefaultOgnlCacheFactory <Member , Boolean >(
5656 CACHE_MAX_SIZE , OgnlCacheFactory .CacheType .WTLFU , CACHE_INITIAL_CAPACITY ).buildOgnlCache ();
57- private static final OgnlCache <Object , Class <?>> targetClassCache = new DefaultOgnlCacheFactory <Object , Class <?>>(
58- CACHE_MAX_SIZE , OgnlCacheFactory .CacheType .WTLFU , CACHE_INITIAL_CAPACITY ).buildOgnlCache ();
5957
6058 /**
6159 * Determine the ultimate target class of the given instance, traversing
@@ -66,18 +64,16 @@ public class ProxyUtil {
6664 * object as fallback; never {@code null})
6765 */
6866 public static Class <?> ultimateTargetClass (Object candidate ) {
69- return targetClassCache .computeIfAbsent (candidate , k -> {
70- Class <?> result = null ;
71- if (isSpringAopProxy (k )) {
72- result = springUltimateTargetClass (k );
73- } else if (isHibernateProxy (k )) {
74- result = getHibernateProxyTarget (k ).getClass ();
75- }
76- if (result == null ) {
77- result = k .getClass ();
78- }
79- return result ;
80- });
67+ Class <?> result = null ;
68+ if (isSpringAopProxy (candidate )) {
69+ result = springUltimateTargetClass (candidate );
70+ } else if (isHibernateProxy (candidate )) {
71+ result = getHibernateProxyTarget (candidate ).getClass ();
72+ }
73+ if (result == null ) {
74+ result = candidate .getClass ();
75+ }
76+ return result ;
8177 }
8278
8379 /**
0 commit comments