mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
better assertions
This commit is contained in:
@@ -1478,7 +1478,9 @@ public abstract class DebugProcessImpl implements DebugProcess {
|
||||
catch (EvaluateException e) {
|
||||
LOG.error(e);
|
||||
}
|
||||
getSuspendManager().popFrame(suspendContext);
|
||||
finally {
|
||||
getSuspendManager().popFrame(suspendContext);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,10 @@ import com.intellij.debugger.engine.events.SuspendContextCommandImpl;
|
||||
import com.intellij.debugger.jdi.ThreadReferenceProxyImpl;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.ListIterator;
|
||||
import java.util.Set;
|
||||
|
||||
/*
|
||||
* Copyright (c) 2000-2004 by JetBrains s.r.o. All Rights Reserved.
|
||||
@@ -52,10 +55,12 @@ public class SuspendManagerUtil {
|
||||
Set<SuspendContextImpl> result = new HashSet<SuspendContextImpl>();
|
||||
|
||||
for (Iterator<SuspendContextImpl> iterator = suspendManager.getEventContexts().iterator(); iterator.hasNext();) {
|
||||
SuspendContextImpl suspendContext = iterator.next();
|
||||
final SuspendContextImpl suspendContext = iterator.next();
|
||||
if(suspendContext.suspends(thread)) {
|
||||
ThreadReferenceProxyImpl contextThread = suspendContext.getThread();
|
||||
LOG.assertTrue(!contextThreads.contains(contextThread));
|
||||
if (contextThreads.contains(contextThread)) {
|
||||
LOG.assertTrue(false, suspendContext.toString());
|
||||
}
|
||||
contextThreads.add(contextThread);
|
||||
result.add(suspendContext);
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ public final class DebuggerContextImpl implements DebuggerContext {
|
||||
DebuggerCommandImpl currentCommand = getDebugProcess().getManagerThread().getCurrentCommand();
|
||||
LOG.assertTrue(currentCommand instanceof SuspendContextCommandImpl);
|
||||
LOG.assertTrue(((SuspendContextCommandImpl)currentCommand).getSuspendContext().getThread() == frameProxy.threadProxy());
|
||||
LOG.error("Thread : " + frameProxy.threadProxy().name(), e);
|
||||
LOG.info("Thread : " + frameProxy.threadProxy().name(), e);
|
||||
objectReference = null;
|
||||
}
|
||||
return new EvaluationContextImpl(getSuspendContext(), frameProxy, objectReference);
|
||||
|
||||
Reference in New Issue
Block a user