]> source.dussan.org Git - aspectj.git/commitdiff
237381: fix: allow deow annotations in code style aspect
authoraclement <aclement>
Tue, 17 Jun 2008 20:29:36 +0000 (20:29 +0000)
committeraclement <aclement>
Tue, 17 Jun 2008 20:29:36 +0000 (20:29 +0000)
weaver/src/org/aspectj/weaver/bcel/AtAjAttributes.java

index d1fde99ec1be304a6c6674ad3511d630045aa4e6..db0ca8becb52a158ad476ac51695c7308ba1aa52 100644 (file)
@@ -246,8 +246,8 @@ public class AtAjAttributes {
         }
 
         // the following block will not detect @Pointcut in non @Aspect types for optimization purpose
-        if (!hasAtAspectAnnotation && !containsPointcut) {
-            return EMPTY_LIST;
+       if (!(hasAtAspectAnnotation || isCodeStyleAspect) && !containsPointcut) {
+           return EMPTY_LIST;
         }
 
         //FIXME AV - turn on when ajcMightHaveAspect
@@ -323,7 +323,7 @@ public class AtAjAttributes {
                     if (handleDeclareErrorOrWarningAnnotation(frvs, fstruct)
                             || handleDeclareParentsAnnotation(frvs, fstruct)) {
                         // semantic check - must be in an @Aspect [remove if previous block bypassed in advance]
-                        if (!type.isAnnotationStyleAspect()) {
+                       if (!type.isAnnotationStyleAspect() && !isCodeStyleAspect) {
                             msgHandler.handleMessage(
                                     new Message(
                                             "Found @AspectJ annotations in a non @Aspect type '" + type.getName() + "'",