mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
avoid getting all declaredMethods, it is causing Class.copyMethods for all of the methods and wasting memory (called frequently)
This commit is contained in:
@@ -192,7 +192,8 @@ public class LocalVariablesUtil {
|
||||
StackFrame frame) throws Exception {
|
||||
final Long frameId = ReflectionUtil.getField(frame.getClass(), frame, long.class, "id");
|
||||
final VirtualMachine vm = frame.virtualMachine();
|
||||
final Method stateMethod = ReflectionUtil.getDeclaredMethod(vm.getClass(), "state");
|
||||
final Method stateMethod = vm.getClass().getDeclaredMethod("state");
|
||||
stateMethod.setAccessible(true);
|
||||
|
||||
Object slotInfoArray = createSlotInfoArray(vars);
|
||||
|
||||
@@ -222,7 +223,8 @@ public class LocalVariablesUtil {
|
||||
try {
|
||||
final Long frameId = ReflectionUtil.getField(frame.getClass(), frame, long.class, "id");
|
||||
final VirtualMachine vm = frame.virtualMachine();
|
||||
final Method stateMethod = ReflectionUtil.getDeclaredMethod(vm.getClass(), "state");
|
||||
final Method stateMethod = vm.getClass().getDeclaredMethod("state");
|
||||
stateMethod.setAccessible(true);
|
||||
|
||||
Object slotInfoArray = createSlotInfoArraySet(slot, value);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user