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

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu May 29 00:09:14 EDT 2008


Author: flavia.rainone at jboss.com
Date: 2008-05-29 00:09:13 -0400 (Thu, 29 May 2008)
New Revision: 73767

Modified:
   projects/aop/trunk/aop/src/main/org/jboss/aop/instrument/JoinPointGenerator.java
Log:
[JBAOP-461] Removed ThreadLocal JoinPointGenerator.AroundAdviceCallStrategy instances

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	2008-05-29 01:27:40 UTC (rev 73766)
+++ projects/aop/trunk/aop/src/main/org/jboss/aop/instrument/JoinPointGenerator.java	2008-05-29 04:09:13 UTC (rev 73767)
@@ -953,7 +953,7 @@
       body.append("{");
       body.append("   try{");
       body.append("      switch(++" + CURRENT_ADVICE + "){");
-      AroundAdviceCallStrategy.getInstance().addInvokeCode(this, aroundSetups, body, info);
+      new AroundAdviceCallStrategy().addInvokeCode(this, aroundSetups, body, info);
       body.append("      default:");
       body.append("         " + returnStr + "this.dispatch();");
       body.append("      }");
@@ -1888,21 +1888,6 @@
    
    private static class AroundAdviceCallStrategy extends AdviceCallStrategy
    {
-      private static ThreadLocal<AroundAdviceCallStrategy> INSTANCE =
-         new ThreadLocal<AroundAdviceCallStrategy>()
-         {
-            protected synchronized AroundAdviceCallStrategy initialValue() {
-               return new AroundAdviceCallStrategy();
-            }
-         };
-   
-      public static final AroundAdviceCallStrategy getInstance()
-      {
-         return INSTANCE.get();
-      }
-      
-      private AroundAdviceCallStrategy() {}
-      
       private int addedAdvice = 0;
       private boolean consistencyEnforced = false;
       




More information about the jboss-cvs-commits mailing list