summaryrefslogtreecommitdiffstats
path: root/org.aspectj.ajdt.core
diff options
context:
space:
mode:
authorjhugunin <jhugunin>2003-08-04 21:04:49 +0000
committerjhugunin <jhugunin>2003-08-04 21:04:49 +0000
commit29457c3d6d0b4cd7cca1d2867e6bd80a56a24722 (patch)
tree39c61e209f18d80a32c50220199ffcd75e4f237b /org.aspectj.ajdt.core
parent57445dd3ec8a67d06f16fe02e7c0eaefb8ea4051 (diff)
downloadaspectj-29457c3d6d0b4cd7cca1d2867e6bd80a56a24722.tar.gz
aspectj-29457c3d6d0b4cd7cca1d2867e6bd80a56a24722.zip
fixes for Bugzilla Bug 40858
super-qualified pointcut reference cause weaver stack trace and Bugzilla Bug 40814 no error when defining interface pointcuts
Diffstat (limited to 'org.aspectj.ajdt.core')
-rw-r--r--org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/PointcutDeclaration.java22
1 files changed, 19 insertions, 3 deletions
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/PointcutDeclaration.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/PointcutDeclaration.java
index 9579cc87e..b987c418b 100644
--- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/PointcutDeclaration.java
+++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/PointcutDeclaration.java
@@ -19,6 +19,8 @@ import org.aspectj.ajdt.internal.compiler.lookup.EclipseFactory;
import org.aspectj.ajdt.internal.core.builder.EclipseSourceContext;
import org.aspectj.weaver.AjAttribute;
import org.aspectj.weaver.ResolvedPointcutDefinition;
+import org.aspectj.weaver.ResolvedTypeX;
+import org.aspectj.weaver.TypeX;
import org.aspectj.weaver.patterns.Pointcut;
import org.eclipse.jdt.internal.compiler.ClassFile;
import org.eclipse.jdt.internal.compiler.CompilationResult;
@@ -72,8 +74,20 @@ public class PointcutDeclaration extends MethodDeclaration {
this.declaredName = new String(selector);
selector = CharOperation.concat(mangledPrefix, '$', selector, '$',
Integer.toHexString(sourceStart).toCharArray());
- if (pointcutDesignator == null) return; //XXX
- pointcutDesignator.postParse(typeDec, this);
+
+ if (Modifier.isAbstract(this.declaredModifiers) &&
+ !(typeDec instanceof AspectDeclaration))
+ {
+ typeDec.scope.problemReporter().signalError(sourceStart, sourceEnd,
+ "The abstract pointcut " + new String(declaredName) +
+ " can only be defined in an aspect");
+ ignoreFurtherInvestigation = true;
+ return;
+ }
+
+ if (pointcutDesignator != null) {
+ pointcutDesignator.postParse(typeDec, this);
+ }
}
public void resolveStatements() {
@@ -86,7 +100,9 @@ public class PointcutDeclaration extends MethodDeclaration {
if (Modifier.isAbstract(this.declaredModifiers)&& (pointcutDesignator != null)) {
scope.problemReporter().signalError(sourceStart, sourceEnd, "abstract pointcut can't have body");
- }
+ ignoreFurtherInvestigation = true;
+ return;
+ }
if (pointcutDesignator != null) {
pointcutDesignator.finishResolveTypes(this, this.binding, arguments.length,