From d47f6d3a24706b438df98e923b49178754462bcd Mon Sep 17 00:00:00 2001 From: Ross Allan Date: Tue, 9 Jul 2013 01:27:35 +0100 Subject: [PATCH] Fix CME in WorldServer Signed-off-by: Ross Allan --- src/common/nallar/tickthreading/patcher/Patches.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/common/nallar/tickthreading/patcher/Patches.java b/src/common/nallar/tickthreading/patcher/Patches.java index 7a4a70dd..5017036e 100644 --- a/src/common/nallar/tickthreading/patcher/Patches.java +++ b/src/common/nallar/tickthreading/patcher/Patches.java @@ -699,6 +699,9 @@ public void addAll(CtClass ctClass, Map attributes) throws NotFo try { CtMethod oldMethod = ctClass.getDeclaredMethod(newMethod.getName(), newMethod.getParameterTypes()); replaceMethod(oldMethod, newMethod); + if (Modifier.isSynchronized(newMethod.getModifiers())) { + oldMethod.setModifiers(oldMethod.getModifiers() | Modifier.SYNCHRONIZED); + } } catch (NotFoundException ignored) { CtMethod added = CtNewMethod.copy(newMethod, ctClass, classMap); ctClass.addMethod(added);