Consistent treatment of proxy classes and interfaces for introspection
Issue: SPR-16675 Issue: SPR-16677
This commit is contained in:
@@ -18,7 +18,6 @@ package org.springframework.core;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import java.lang.reflect.Proxy;
|
||||
import java.util.Collections;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.Map;
|
||||
@@ -58,10 +57,10 @@ public abstract class MethodIntrospector {
|
||||
Class<?> specificHandlerType = null;
|
||||
|
||||
if (!Proxy.isProxyClass(targetType)) {
|
||||
handlerTypes.add(targetType);
|
||||
specificHandlerType = targetType;
|
||||
specificHandlerType = ClassUtils.getUserClass(targetType);
|
||||
handlerTypes.add(specificHandlerType);
|
||||
}
|
||||
Collections.addAll(handlerTypes, targetType.getInterfaces());
|
||||
handlerTypes.addAll(ClassUtils.getAllInterfacesForClassAsSet(targetType));
|
||||
|
||||
for (Class<?> currentHandlerType : handlerTypes) {
|
||||
final Class<?> targetClass = (specificHandlerType != null ? specificHandlerType : currentHandlerType);
|
||||
|
||||
Reference in New Issue
Block a user