]> source.dussan.org Git - aspectj.git/commitdiff
fix for Bugzilla Bug 36736
authorjhugunin <jhugunin>
Tue, 22 Apr 2003 17:31:00 +0000 (17:31 +0000)
committerjhugunin <jhugunin>
Tue, 22 Apr 2003 17:31:00 +0000 (17:31 +0000)
   compiler error expected for implemented abstract pointcuts
(using declaredModifiers instead of modifiers so interfaces don't cause trouble)

org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/PointcutDeclaration.java

index fc4551ec61fa16339173a95dcaea1ef4879cf827..9579cc87ea28dc9c4d9910dafb124d8ac28d7cb4 100644 (file)
@@ -13,6 +13,8 @@
 
 package org.aspectj.ajdt.internal.compiler.ast;
 
+import java.lang.reflect.Modifier;
+
 import org.aspectj.ajdt.internal.compiler.lookup.EclipseFactory;
 import org.aspectj.ajdt.internal.core.builder.EclipseSourceContext;
 import org.aspectj.weaver.AjAttribute;
@@ -77,12 +79,14 @@ public class PointcutDeclaration extends MethodDeclaration {
        public void resolveStatements() {
                if (isAbstract()) {
                        this.modifiers |= AccSemicolonBody;
-                       if (pointcutDesignator != null) {
-                               scope.problemReporter().signalError(sourceStart, sourceEnd, "abstract pointcut can't have body");
-                       }
-               } 
+               }
+
                
                if (binding == null || ignoreFurtherInvestigation) return;
+
+               if (Modifier.isAbstract(this.declaredModifiers)&& (pointcutDesignator != null)) {
+                       scope.problemReporter().signalError(sourceStart, sourceEnd, "abstract pointcut can't have body");
+               } 
                
                if (pointcutDesignator != null) {
                        pointcutDesignator.finishResolveTypes(this, this.binding, arguments.length,