[jboss-cvs] javassist SVN: r637 - trunk/src/main/javassist/util/proxy.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Jun 14 12:40:11 EDT 2012


Author: chiba
Date: 2012-06-14 12:40:11 -0400 (Thu, 14 Jun 2012)
New Revision: 637

Modified:
   trunk/src/main/javassist/util/proxy/RuntimeSupport.java
Log:
fixed JASSIST-163

Modified: trunk/src/main/javassist/util/proxy/RuntimeSupport.java
===================================================================
--- trunk/src/main/javassist/util/proxy/RuntimeSupport.java	2012-06-12 16:15:32 UTC (rev 636)
+++ trunk/src/main/javassist/util/proxy/RuntimeSupport.java	2012-06-14 16:40:11 UTC (rev 637)
@@ -50,11 +50,15 @@
                                     String thisMethod, int index,
                                     String desc, java.lang.reflect.Method[] methods)
     {
-        synchronized (methods) {
-            if (methods[index] == null) {
-                methods[index + 1] = thisMethod == null ? null
-                                     : findMethod(self, thisMethod, desc);
-                methods[index] = findSuperMethod(self, superMethod, desc);
+        if (methods[index] == null) {
+            Method m1 = thisMethod == null ? null
+                                           : findMethod(self, thisMethod, desc);
+            Method m0 = findSuperMethod(self, superMethod, desc);
+            synchronized (methods) {
+                if (methods[index] == null) {
+                    methods[index + 1] = m1;
+                    methods[index] = m0;
+                }
             }
         }
     }



More information about the jboss-cvs-commits mailing list