Skip to content

Commit c76f017

Browse files
committed
AOP support for PR #1950
1 parent 3dc7fc0 commit c76f017

File tree

1 file changed

+6
-0
lines changed
  • spring-aop/src/main/java/org/springframework/aop/support

1 file changed

+6
-0
lines changed

spring-aop/src/main/java/org/springframework/aop/support/AopUtils.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,12 @@ public static boolean isFinalizeMethod(@Nullable Method method) {
193193
*/
194194
public static Method getMostSpecificMethod(Method method, @Nullable Class<?> targetClass) {
195195
Class<?> specificTargetClass = (targetClass != null ? ClassUtils.getUserClass(targetClass) : null);
196+
Class<?>[] interfaces = targetClass.getInterfaces();
197+
for (Class<?> itf : interfaces) {
198+
Method mostSpecificMethod = getMostSpecificMethod(method, itf);
199+
if (mostSpecificMethod != method)
200+
return mostSpecificMethod;
201+
}
196202
Method resolvedMethod = ClassUtils.getMostSpecificMethod(method, specificTargetClass);
197203
// If we are dealing with method with generic parameters, find the original method.
198204
return BridgeMethodResolver.findBridgedMethod(resolvedMethod);

0 commit comments

Comments
 (0)