Polish AbstractAspectJAdvisorFactory
Closes gh-27340
This commit is contained in:
@@ -103,10 +103,11 @@ public abstract class AbstractAspectJAdvisorFactory implements AspectJAdvisorFac
|
|||||||
@Override
|
@Override
|
||||||
public void validate(Class<?> aspectClass) throws AopConfigException {
|
public void validate(Class<?> aspectClass) throws AopConfigException {
|
||||||
// If the parent has the annotation and isn't abstract it's an error
|
// If the parent has the annotation and isn't abstract it's an error
|
||||||
if (aspectClass.getSuperclass().getAnnotation(Aspect.class) != null &&
|
Class<?> superclass = aspectClass.getSuperclass();
|
||||||
!Modifier.isAbstract(aspectClass.getSuperclass().getModifiers())) {
|
if (superclass.getAnnotation(Aspect.class) != null &&
|
||||||
|
!Modifier.isAbstract(superclass.getModifiers())) {
|
||||||
throw new AopConfigException("[" + aspectClass.getName() + "] cannot extend concrete aspect [" +
|
throw new AopConfigException("[" + aspectClass.getName() + "] cannot extend concrete aspect [" +
|
||||||
aspectClass.getSuperclass().getName() + "]");
|
superclass.getName() + "]");
|
||||||
}
|
}
|
||||||
|
|
||||||
AjType<?> ajType = AjTypeSystem.getAjType(aspectClass);
|
AjType<?> ajType = AjTypeSystem.getAjType(aspectClass);
|
||||||
|
|||||||
Reference in New Issue
Block a user