aboutsummaryrefslogtreecommitdiffstats
path: root/weaver
diff options
context:
space:
mode:
authoravasseur <avasseur>2005-10-28 12:07:14 +0000
committeravasseur <avasseur>2005-10-28 12:07:14 +0000
commit794f9b5eafe34a7dbb48cda3edaec59ff57afef5 (patch)
treee604dc616dec2d7525a9a9b1d8a0aea7817abf47 /weaver
parent8d479b227be4f8228265f37589b565b78f84d523 (diff)
downloadaspectj-794f9b5eafe34a7dbb48cda3edaec59ff57afef5.tar.gz
aspectj-794f9b5eafe34a7dbb48cda3edaec59ff57afef5.zip
#108892 cannot reproduce: hierarchy of aop.xml accross classloader test is fine
Diffstat (limited to 'weaver')
-rw-r--r--weaver/src/org/aspectj/weaver/bcel/AtAjAttributes.java26
1 files changed, 21 insertions, 5 deletions
diff --git a/weaver/src/org/aspectj/weaver/bcel/AtAjAttributes.java b/weaver/src/org/aspectj/weaver/bcel/AtAjAttributes.java
index f3846c53a..66a21b84b 100644
--- a/weaver/src/org/aspectj/weaver/bcel/AtAjAttributes.java
+++ b/weaver/src/org/aspectj/weaver/bcel/AtAjAttributes.java
@@ -243,7 +243,14 @@ public class AtAjAttributes {
// bypass what we have read
return EMPTY_LIST;
}
- //FIXME turn on when ajcMightHaveAspect
+
+ // the following block will not detect @Pointcut in non @Aspect types for optimization purpose
+ if (!hasAtAspectAnnotation) {
+ return EMPTY_LIST;
+ }
+
+
+ //FIXME AV - turn on when ajcMightHaveAspect
// if (hasAtAspectAnnotation && type.isInterface()) {
// msgHandler.handleMessage(
// new Message(
@@ -257,10 +264,19 @@ public class AtAjAttributes {
// return EMPTY_LIST;
// }
- // the following block will not detect @Pointcut in non @Aspect types for optimization purpose
- if (!hasAtAspectAnnotation) {
- return EMPTY_LIST;
- }
+ // semantic check: @Aspect must be public
+ // FIXME AV - do we really want to enforce that?
+// if (hasAtAspectAnnotation && !javaClass.isPublic()) {
+// msgHandler.handleMessage(
+// new Message(
+// "Found @Aspect annotation on a non public class '" + javaClass.getClassName() + "'",
+// IMessage.ERROR,
+// null,
+// type.getSourceLocation()
+// )
+// );
+// return EMPTY_LIST;
+// }
// code style pointcuts are class attributes
// we need to gather the @AJ pointcut right now and not at method level annotation extraction time