From 955a9a8b3bf4061cb07e8ee52d8832820f3499bc Mon Sep 17 00:00:00 2001 From: Benjamin Reed Date: Thu, 28 Jul 2022 09:25:06 -0400 Subject: [PATCH] fix a minor issue with the backport --- .../org/springframework/aop/framework/AopProxyUtils.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 af9e277b5231..9f203a69be4a 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 @@ -86,10 +86,11 @@ public static Class[] completeProxiedInterfaces(AdvisedSupport advised) { Class[] specifiedInterfaces = advised.getProxiedInterfaces(); if (specifiedInterfaces.length == 0) { // No user-specified interfaces: check whether target class is an interface. - Class targetClass = advised.getTargetClass(); + Class targetClass = advised.getTargetClass(); if (targetClass != null) { if (targetClass.isInterface()) { - advised.setInterfaces(targetClass); + specifiedInterfaces = new Class[] {targetClass}; + advised.setInterfaces(specifiedInterfaces); } else if (Proxy.isProxyClass(targetClass)) { advised.setInterfaces(targetClass.getInterfaces());