From 13a2b0372d589d95b8f00ba6a54189ceb6191db2 Mon Sep 17 00:00:00 2001 From: chiba Date: Thu, 14 Jun 2012 16:40:11 +0000 Subject: fixed JASSIST-163 git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@637 30ef5769-5b8d-40dd-aea6-55b5d6557bb3 --- src/main/javassist/util/proxy/RuntimeSupport.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/main/javassist/util/proxy/RuntimeSupport.java b/src/main/javassist/util/proxy/RuntimeSupport.java index 687fc8dc..3971e395 100644 --- a/src/main/javassist/util/proxy/RuntimeSupport.java +++ b/src/main/javassist/util/proxy/RuntimeSupport.java @@ -50,11 +50,15 @@ public class RuntimeSupport { 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; + } } } } -- cgit v1.2.3