Browse Source

Simplify AdvisedSupport.removeAdvisor()

Closes gh-24205
pull/24212/head
Сергей Цыпанов 5 years ago committed by Sam Brannen
parent
commit
d9cae339d6
  1. 8
      spring-aop/src/main/java/org/springframework/aop/framework/AdvisedSupport.java

8
spring-aop/src/main/java/org/springframework/aop/framework/AdvisedSupport.java

@ -283,16 +283,16 @@ public class AdvisedSupport extends ProxyConfig implements Advised { @@ -283,16 +283,16 @@ public class AdvisedSupport extends ProxyConfig implements Advised {
"This configuration only has " + this.advisors.size() + " advisors.");
}
Advisor advisor = this.advisors.get(index);
Advisor advisor = this.advisors.remove(index);
if (advisor instanceof IntroductionAdvisor) {
IntroductionAdvisor ia = (IntroductionAdvisor) advisor;
// We need to remove introduction interfaces.
for (int j = 0; j < ia.getInterfaces().length; j++) {
removeInterface(ia.getInterfaces()[j]);
Class<?>[] interfaces = ia.getInterfaces();
for (Class<?> iface : interfaces) {
removeInterface(iface);
}
}
this.advisors.remove(index);
updateAdvisorArray();
adviceChanged();
}

Loading…
Cancel
Save