mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
check that vms match if class loader is null, otherwise we may take last result from the different debug session
This commit is contained in:
+5
-2
@@ -52,9 +52,12 @@ public class TypeEvaluator implements Evaluator {
|
||||
*/
|
||||
public Object evaluate(EvaluationContextImpl context) throws EvaluateException {
|
||||
ClassLoaderReference classLoader = context.getClassLoader();
|
||||
Object lastRes = SoftReference.dereference(myLastResult);
|
||||
ReferenceType lastRes = SoftReference.dereference(myLastResult);
|
||||
if (lastRes != null && classLoader == SoftReference.dereference(myLastClassLoader)) {
|
||||
return lastRes;
|
||||
// if class loader is null, check that vms match
|
||||
if (classLoader != null || lastRes.virtualMachine().equals(context.getDebugProcess().getVirtualMachineProxy().getVirtualMachine())) {
|
||||
return lastRes;
|
||||
}
|
||||
}
|
||||
DebugProcessImpl debugProcess = context.getDebugProcess();
|
||||
String typeName = myTypeName.getName(debugProcess);
|
||||
|
||||
Reference in New Issue
Block a user