From 2fd8894377f7d2515a00f7dd73ec30f90d333cb1 Mon Sep 17 00:00:00 2001 From: aclement Date: Tue, 17 Jun 2008 20:29:36 +0000 Subject: [PATCH] 237381: fix: allow deow annotations in code style aspect --- weaver/src/org/aspectj/weaver/bcel/AtAjAttributes.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/weaver/src/org/aspectj/weaver/bcel/AtAjAttributes.java b/weaver/src/org/aspectj/weaver/bcel/AtAjAttributes.java index d1fde99ec..db0ca8bec 100644 --- a/weaver/src/org/aspectj/weaver/bcel/AtAjAttributes.java +++ b/weaver/src/org/aspectj/weaver/bcel/AtAjAttributes.java @@ -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() + "'", -- 2.39.5