From 357beb24bce72b20aed3a774b4eddc42e3f098f2 Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Wed, 25 Sep 2019 22:15:07 +0200 Subject: [PATCH] Polishing --- .../aop/support/ComposablePointcut.java | 2 +- .../support/DefaultIntroductionAdvisor.java | 22 +++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/spring-aop/src/main/java/org/springframework/aop/support/ComposablePointcut.java b/spring-aop/src/main/java/org/springframework/aop/support/ComposablePointcut.java index eb3af72b9f..26c27a35f0 100644 --- a/spring-aop/src/main/java/org/springframework/aop/support/ComposablePointcut.java +++ b/spring-aop/src/main/java/org/springframework/aop/support/ComposablePointcut.java @@ -202,7 +202,7 @@ public class ComposablePointcut implements Pointcut, Serializable { @Override public String toString() { - return "ComposablePointcut: " + this.classFilter + ", " + this.methodMatcher; + return getClass().getName() + ": " + this.classFilter + ", " + this.methodMatcher; } } diff --git a/spring-aop/src/main/java/org/springframework/aop/support/DefaultIntroductionAdvisor.java b/spring-aop/src/main/java/org/springframework/aop/support/DefaultIntroductionAdvisor.java index 1c65a19a2a..04a5da6ca3 100644 --- a/spring-aop/src/main/java/org/springframework/aop/support/DefaultIntroductionAdvisor.java +++ b/spring-aop/src/main/java/org/springframework/aop/support/DefaultIntroductionAdvisor.java @@ -82,25 +82,25 @@ public class DefaultIntroductionAdvisor implements IntroductionAdvisor, ClassFil /** * Create a DefaultIntroductionAdvisor for the given advice. * @param advice the Advice to apply - * @param intf the interface to introduce + * @param ifc the interface to introduce */ - public DefaultIntroductionAdvisor(DynamicIntroductionAdvice advice, Class intf) { + public DefaultIntroductionAdvisor(DynamicIntroductionAdvice advice, Class ifc) { Assert.notNull(advice, "Advice must not be null"); this.advice = advice; - addInterface(intf); + addInterface(ifc); } /** * Add the specified interface to the list of interfaces to introduce. - * @param intf the interface to introduce + * @param ifc the interface to introduce */ - public void addInterface(Class intf) { - Assert.notNull(intf, "Interface must not be null"); - if (!intf.isInterface()) { - throw new IllegalArgumentException("Specified class [" + intf.getName() + "] must be an interface"); + public void addInterface(Class ifc) { + Assert.notNull(ifc, "Interface must not be null"); + if (!ifc.isInterface()) { + throw new IllegalArgumentException("Specified class [" + ifc.getName() + "] must be an interface"); } - this.interfaces.add(intf); + this.interfaces.add(ifc); } @Override @@ -113,8 +113,8 @@ public class DefaultIntroductionAdvisor implements IntroductionAdvisor, ClassFil for (Class ifc : this.interfaces) { if (this.advice instanceof DynamicIntroductionAdvice && !((DynamicIntroductionAdvice) this.advice).implementsInterface(ifc)) { - throw new IllegalArgumentException("DynamicIntroductionAdvice [" + this.advice + "] " + - "does not implement interface [" + ifc.getName() + "] specified for introduction"); + throw new IllegalArgumentException("DynamicIntroductionAdvice [" + this.advice + "] " + + "does not implement interface [" + ifc.getName() + "] specified for introduction"); } } } -- GitLab