Add synchronized modifier to runtime enhanced enum methods

This commit is contained in:
tterrag 2019-02-07 17:01:40 -05:00
parent 79c17cb542
commit 065ebd748a

View file

@ -133,6 +133,7 @@ public class RuntimeEnumExtender implements ILaunchPluginService {
values.access &= values.access & ~Opcodes.ACC_FINAL; //Strip the final so JITer doesn't inline things. values.access &= values.access & ~Opcodes.ACC_FINAL; //Strip the final so JITer doesn't inline things.
mtd.access |= Opcodes.ACC_SYNCHRONIZED;
mtd.instructions.clear(); mtd.instructions.clear();
InstructionAdapter ins = new InstructionAdapter(mtd); InstructionAdapter ins = new InstructionAdapter(mtd);