]> source.dussan.org Git - aspectj.git/commitdiff
signature of static method for if pcd shouldn't include extra parameters
authorjhugunin <jhugunin>
Tue, 17 Dec 2002 23:24:49 +0000 (23:24 +0000)
committerjhugunin <jhugunin>
Tue, 17 Dec 2002 23:24:49 +0000 (23:24 +0000)
for advice

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

index 653039b96d238246e12a6f85eb4cb15be3eea74c..86c0c0468511dbf2590ccdae94d224fdd8543a59 100644 (file)
@@ -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;
        }