From b8d94d2b4aa34ed8dc3775c7770eb99b2b8fa67e Mon Sep 17 00:00:00 2001 From: jhugunin Date: Tue, 17 Dec 2002 23:24:49 +0000 Subject: [PATCH] signature of static method for if pcd shouldn't include extra parameters for advice --- .../aspectj/ajdt/internal/compiler/ast/IfPseudoToken.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/IfPseudoToken.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/IfPseudoToken.java index 653039b96..86c0c0468 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/IfPseudoToken.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/ast/IfPseudoToken.java @@ -95,15 +95,17 @@ public class IfPseudoToken extends PseudoToken { private Argument[] makeArguments(MethodDeclaration enclosingDec) { Argument[] baseArguments = enclosingDec.arguments; int len = baseArguments.length; + if (enclosingDec instanceof AdviceDeclaration) { + len = ((AdviceDeclaration)enclosingDec).baseArgumentCount; + } + Argument[] ret = new Argument[len]; for (int i=0; i < len; i ++) { Argument a = baseArguments[i]; ret[i] = new Argument(a.name, AstUtil.makeLongPos(a.sourceStart, a.sourceEnd), a.type, Modifier.FINAL); } - if (!(enclosingDec instanceof AdviceDeclaration)) { - ret = AdviceDeclaration.addTjpArguments(ret); - } + ret = AdviceDeclaration.addTjpArguments(ret); return ret; } -- 2.39.5