diff options
author | acolyer <acolyer> | 2004-08-10 13:22:08 +0000 |
---|---|---|
committer | acolyer <acolyer> | 2004-08-10 13:22:08 +0000 |
commit | 05dabd1821fffd9f353d1e965a56658b962c82d7 (patch) | |
tree | ac21652c7b86d12a0deaf3f287e97b6f5d07f16b /org.aspectj.ajdt.core | |
parent | b3f5f6fe945ef35f8a3b97ec71bb5cc57e89a641 (diff) | |
download | aspectj-05dabd1821fffd9f353d1e965a56658b962c82d7.tar.gz aspectj-05dabd1821fffd9f353d1e965a56658b962c82d7.zip |
fix for Bugzilla Bug 53981
proceed used as method name in around advice
Diffstat (limited to 'org.aspectj.ajdt.core')
-rw-r--r-- | org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/Proceed.java | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/Proceed.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/Proceed.java index ae07cec86..82e96f1e8 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/Proceed.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/Proceed.java @@ -1,5 +1,6 @@ /* ******************************************************************* * Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC). + * 2004 contributors * All rights reserved. * This program and the accompanying materials are made available * under the terms of the Common Public License v1.0 @@ -7,7 +8,8 @@ * http://www.eclipse.org/legal/cpl-v10.html * * Contributors: - * PARC initial implementation + * PARC initial implementation + * IBM ongoing maintenance * ******************************************************************/ @@ -26,7 +28,8 @@ import org.eclipse.jdt.internal.compiler.lookup.TypeBinding; /** * Used to represent any method call to a method named <code>proceed</code>. During * <code>resolvedType</code> it will be determined if this is actually in the body - * of an <code>around</code> advice and if not this will be treated like any other + * of an <code>around</code> advice and has no receiver (must be a bare proceed call, + * see pr 53981), and if not this will be treated like any other * MessageSend. * * @author Jim Hugunin @@ -111,13 +114,15 @@ public class Proceed extends MessageSend { private AdviceDeclaration findEnclosingAround(Scope scope) { if (scope == null) return null; - + if (scope instanceof MethodScope) { MethodScope methodScope = (MethodScope)scope; ReferenceContext context = methodScope.referenceContext; if (context instanceof AdviceDeclaration) { AdviceDeclaration adviceDecl = (AdviceDeclaration)context; if (adviceDecl.kind == AdviceKind.Around) { + // pr 53981 only match "bare" calls to proceed + if((receiver != null) && (!receiver.isThis())) { return null; } adviceDecl.proceedCalls.add(this); return adviceDecl; } else { |