Browse Source

fix for Bugzilla Bug 36736

   compiler error expected for implemented abstract pointcuts 
(using declaredModifiers instead of modifiers so interfaces don't cause trouble)
tags/V1_1_0_RC2
jhugunin 21 years ago
parent
commit
7dcc9481d1

+ 8
- 4
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/PointcutDeclaration.java View 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,

Loading…
Cancel
Save