Skip to content

Commit 9c204dc

Browse files
authored
Polish AbstractAspectJAdvisorFactory
Closes gh-27340
1 parent 21c0e50 commit 9c204dc

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

spring-aop/src/main/java/org/springframework/aop/aspectj/annotation/AbstractAspectJAdvisorFactory.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,11 @@ private boolean compiledByAjc(Class<?> clazz) {
103103
@Override
104104
public void validate(Class<?> aspectClass) throws AopConfigException {
105105
// If the parent has the annotation and isn't abstract it's an error
106-
if (aspectClass.getSuperclass().getAnnotation(Aspect.class) != null &&
107-
!Modifier.isAbstract(aspectClass.getSuperclass().getModifiers())) {
106+
Class<?> superclass = aspectClass.getSuperclass();
107+
if (superclass.getAnnotation(Aspect.class) != null &&
108+
!Modifier.isAbstract(superclass.getModifiers())) {
108109
throw new AopConfigException("[" + aspectClass.getName() + "] cannot extend concrete aspect [" +
109-
aspectClass.getSuperclass().getName() + "]");
110+
superclass.getName() + "]");
110111
}
111112

112113
AjType<?> ajType = AjTypeSystem.getAjType(aspectClass);

0 commit comments

Comments
 (0)