[jboss-cvs] JBossAS SVN: r60152 - projects/aop/trunk/aop/src/main/org/jboss/aop/instrument.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Jan 31 19:30:14 EST 2007


Author: flavia.rainone at jboss.com
Date: 2007-01-31 19:30:13 -0500 (Wed, 31 Jan 2007)
New Revision: 60152

Modified:
   projects/aop/trunk/aop/src/main/org/jboss/aop/instrument/JoinPointGenerator.java
Log:
Bug on cflows (aspects were being associated with wrong cflow expressions)

Modified: projects/aop/trunk/aop/src/main/org/jboss/aop/instrument/JoinPointGenerator.java
===================================================================
--- projects/aop/trunk/aop/src/main/org/jboss/aop/instrument/JoinPointGenerator.java	2007-01-31 20:12:44 UTC (rev 60151)
+++ projects/aop/trunk/aop/src/main/org/jboss/aop/instrument/JoinPointGenerator.java	2007-02-01 00:30:13 UTC (rev 60152)
@@ -55,7 +55,8 @@
 import org.jboss.aop.util.JavassistUtils;
 import org.jboss.aop.util.ReflectToJavassist;
 
-/** Creates the Joinpoint invocation replacement classes used with Generated advisors
+/**
+ * Creates the Joinpoint invocation replacement classes used with Generated advisors
  * 
  * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
  * @version $Revision$
@@ -865,7 +866,7 @@
    {
       if (! isVoid())
       {
-         code.append("          " + RETURN_VALUE + " = ");
+         code.append("          " + RETURN_VALUE + " = ($r)");
       }
       code.append("super.dispatch(");
       if (argsFound)
@@ -922,7 +923,6 @@
       body.append("{");
       body.append("   try{");
       body.append("      switch(++" + CURRENT_ADVICE + "){");
-      
       addInvokeCode(AroundAdviceCallStrategy.getInstance(), aroundSetups, body);
       body.append("      default:");
       body.append("         " + returnStr + "this.dispatch();");
@@ -1113,7 +1113,7 @@
          {
             params[i + aspectsLength] = astCFlowExpr;
             init.append("cflow" + cflows.get(i) + "= $" + (i + aspectsLength + 1) + ";");
-            init.append("matchesCflow" + cflows.get(i) + " = getCFlow" + allSetups[i].useCFlowFrom() + "();");
+            init.append("matchesCflow" + cflows.get(i) + " = getCFlow" + allSetups[cflows.get(i)].useCFlowFrom() + "();");
          }
       }
       




More information about the jboss-cvs-commits mailing list