diff --git a/src/main/java/edu/umd/dawn/common/annotations/AspectBase.java b/src/main/java/edu/umd/dawn/common/annotations/AspectBase.java index dcda5ffa1716b01dfec5e41ae55653bd25ed9148..fe80d974a16d6b2ed82c8cc1a10a8a66d666af48 100644 --- a/src/main/java/edu/umd/dawn/common/annotations/AspectBase.java +++ b/src/main/java/edu/umd/dawn/common/annotations/AspectBase.java @@ -29,8 +29,4 @@ public class AspectBase<T extends Annotation> { ((MethodSignature) jointPoint.getSignature()).getDeclaringType().getAnnotation(clazz); } - // protected T grabMethodArgument(ProceedingJoinPoint jointPoint, Class<T> clazz) { - // return (T) - // ((MethodSignature) jointPoint.getSignature()).getDeclaringType().getAnnotation(clazz); - // } } diff --git a/src/main/java/edu/umd/dawn/common/annotations/DeprecatedAspect.java b/src/main/java/edu/umd/dawn/common/annotations/DeprecatedAspect.java index 28acc599009a337c3b78e745a4be3d67d6de1199..7a652715ed5a8bace95dc961d0d2acd6f1595f17 100644 --- a/src/main/java/edu/umd/dawn/common/annotations/DeprecatedAspect.java +++ b/src/main/java/edu/umd/dawn/common/annotations/DeprecatedAspect.java @@ -11,7 +11,7 @@ import org.springframework.stereotype.Component; @Log4j2 public class DeprecatedAspect extends AspectBase<Deprecated> { - @Around("@annotation(Deprecated)") + @Around("@annotation(Deprecated) && within(edu.umd.dawn..**)") public Object run(ProceedingJoinPoint jointPoint) throws Exception, Throwable { Deprecated annotation = grabAnnotation(jointPoint, Deprecated.class); String descriptor = getFullDescriptor(jointPoint); diff --git a/src/main/java/edu/umd/dawn/common/annotations/RoleRestrictionAspect.java b/src/main/java/edu/umd/dawn/common/annotations/RoleRestrictionAspect.java index b57c860a9b262c6dae372739056283c09a0099a1..e9d5f2f4335bd6ab8167b7da15928d351f315b28 100644 --- a/src/main/java/edu/umd/dawn/common/annotations/RoleRestrictionAspect.java +++ b/src/main/java/edu/umd/dawn/common/annotations/RoleRestrictionAspect.java @@ -24,7 +24,7 @@ public class RoleRestrictionAspect extends AspectBase<RoleRestriction> { @Value("${config.local}") private boolean local = false; - @Around("@annotation(RoleRestriction)") + @Around("@annotation(RoleRestriction) && within(edu.umd.dawn..**)") public Object run(ProceedingJoinPoint jointPoint) throws Exception, Throwable { RoleRestriction annotation = grabAnnotation(jointPoint, RoleRestriction.class); if (!local) { diff --git a/src/main/java/edu/umd/dawn/common/annotations/TraceableAspect.java b/src/main/java/edu/umd/dawn/common/annotations/TraceableAspect.java index f2afac9b15ceb8f397152c81c19690964d555c61..aef02b1b9cc6bdefeb5f9d7a32d4f23f7fb1ee97 100644 --- a/src/main/java/edu/umd/dawn/common/annotations/TraceableAspect.java +++ b/src/main/java/edu/umd/dawn/common/annotations/TraceableAspect.java @@ -15,7 +15,7 @@ import org.springframework.stereotype.Component; @Component public class TraceableAspect extends AspectBase<Traceable> { - @Around("@annotation(Traceable)") + @Around("@annotation(Traceable) && within(edu.umd.dawn..**)") public Object run(ProceedingJoinPoint jointPoint) throws Exception, Throwable { Traceable traceable = grabAnnotation(jointPoint, Traceable.class); diff --git a/src/main/java/edu/umd/dawn/common/annotations/UnfinishedAspect.java b/src/main/java/edu/umd/dawn/common/annotations/UnfinishedAspect.java index 781dbf523c40adb2bf1576274323d59b80f9afa8..d4b4fc38e492d0fccffbb51a06294747cae63dd0 100644 --- a/src/main/java/edu/umd/dawn/common/annotations/UnfinishedAspect.java +++ b/src/main/java/edu/umd/dawn/common/annotations/UnfinishedAspect.java @@ -14,7 +14,7 @@ import org.springframework.stereotype.Component; @Log4j2 public class UnfinishedAspect extends AspectBase<Unfinished> { - @Around("@annotation(Unfinished)") + @Around("@annotation(Unfinished) && within(edu.umd.dawn..**)") public Object run(ProceedingJoinPoint jointPoint) throws Exception, Throwable { Unfinished unfinished = grabAnnotation(jointPoint, Unfinished.class);