diff options
author | chiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3> | 2012-06-14 16:40:11 +0000 |
---|---|---|
committer | chiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3> | 2012-06-14 16:40:11 +0000 |
commit | 13a2b0372d589d95b8f00ba6a54189ceb6191db2 (patch) | |
tree | 8be91b1bfe0979c09219a4767ccc50d654b46516 | |
parent | e75c12e0964f27abb798393473913307d24efe61 (diff) | |
download | javassist-13a2b0372d589d95b8f00ba6a54189ceb6191db2.tar.gz javassist-13a2b0372d589d95b8f00ba6a54189ceb6191db2.zip |
fixed JASSIST-163
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@637 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
-rw-r--r-- | src/main/javassist/util/proxy/RuntimeSupport.java | 14 |
1 files changed, 9 insertions, 5 deletions
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; + } } } } |