From 8ff468dda46894084e0878fd9cf68c5798bbdfcf Mon Sep 17 00:00:00 2001 From: jhugunin Date: Wed, 18 Dec 2002 18:23:38 +0000 Subject: [PATCH] fixed order of thisJoinPoint and thisJoinPointStaticPart --- .../org/aspectj/weaver/bcel/BcelAdvice.java | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelAdvice.java b/weaver/src/org/aspectj/weaver/bcel/BcelAdvice.java index b3a42edf3..6c9e4055a 100644 --- a/weaver/src/org/aspectj/weaver/bcel/BcelAdvice.java +++ b/weaver/src/org/aspectj/weaver/bcel/BcelAdvice.java @@ -61,13 +61,13 @@ public class BcelAdvice extends Advice { pointcutTest = getPointcut().findResidue(shadow, exposedState); // make sure thisJoinPoint parameters are initialized - if ((extraParameterFlags & ThisJoinPoint) != 0) { - ((BcelShadow)shadow).getThisJoinPointVar(); - } - if ((extraParameterFlags & ThisJoinPointStaticPart) != 0) { ((BcelShadow)shadow).getThisJoinPointStaticPartVar(); } + + if ((extraParameterFlags & ThisJoinPoint) != 0) { + ((BcelShadow)shadow).getThisJoinPointVar(); + } if ((extraParameterFlags & ThisEnclosingJoinPointStaticPart) != 0) { ((BcelShadow)shadow).getThisEnclosingJoinPointStaticPartVar(); @@ -211,14 +211,17 @@ public class BcelAdvice extends Advice { } // handle thisJoinPoint parameters - if ((extraParameterFlags & ThisJoinPoint) != 0) { - shadow.getThisJoinPointBcelVar().appendLoad(il, fact); - } - + // these need to be in that same order as parameters in + // org.aspectj.ajdt.internal.compiler.ast.AdviceDeclaration if ((extraParameterFlags & ThisJoinPointStaticPart) != 0) { shadow.getThisJoinPointStaticPartBcelVar().appendLoad(il, fact); } + if ((extraParameterFlags & ThisJoinPoint) != 0) { + shadow.getThisJoinPointBcelVar().appendLoad(il, fact); + } + + if ((extraParameterFlags & ThisEnclosingJoinPointStaticPart) != 0) { shadow.getThisEnclosingJoinPointStaticPartBcelVar().appendLoad(il, fact); } -- 2.39.5