diff --git a/java/debugger/impl/src/com/intellij/debugger/engine/SuspendManagerImpl.java b/java/debugger/impl/src/com/intellij/debugger/engine/SuspendManagerImpl.java index 8e561f1fe352..07bed88ea199 100644 --- a/java/debugger/impl/src/com/intellij/debugger/engine/SuspendManagerImpl.java +++ b/java/debugger/impl/src/com/intellij/debugger/engine/SuspendManagerImpl.java @@ -19,7 +19,6 @@ import com.intellij.debugger.jdi.ThreadReferenceProxyImpl; import com.intellij.openapi.diagnostic.Logger; import com.sun.jdi.InternalException; import com.sun.jdi.ObjectCollectedException; -import com.sun.jdi.ThreadReference; import com.sun.jdi.event.EventSet; import com.sun.jdi.request.EventRequest; @@ -116,19 +115,19 @@ public class SuspendManagerImpl implements SuspendManager { LOG.debug("Start resuming eventSet " + set.toString() + " suspendPolicy = " + set.suspendPolicy() + ",size = " + set.size()); } myDebugProcess.logThreads(); - final ThreadReferenceProxyImpl thread = getThread(); - - if (thread != null) { // check that thread is suspended at the moment - try { - if (!thread.isSuspended()) { - final int status = thread.status(); - if ((status != ThreadReference.THREAD_STATUS_ZOMBIE) && (status != ThreadReference.THREAD_STATUS_NOT_STARTED) && (status != ThreadReference.THREAD_STATUS_UNKNOWN)) { - LOG.error("Context thread must be suspended"); - } - } - } - catch (ObjectCollectedException ignored) {} - } + //final ThreadReferenceProxyImpl thread = getThread(); + // + //if (thread != null) { // check that thread is suspended at the moment + // try { + // if (!thread.isSuspended()) { + // final int status = thread.status(); + // if ((status != ThreadReference.THREAD_STATUS_ZOMBIE) && (status != ThreadReference.THREAD_STATUS_NOT_STARTED) && (status != ThreadReference.THREAD_STATUS_UNKNOWN)) { + // LOG.error("Context thread must be suspended"); + // } + // } + // } + // catch (ObjectCollectedException ignored) {} + //} int attempts = 5; while (--attempts > 0) { diff --git a/platform/lang-api/src/com/intellij/execution/ui/RunContentDescriptor.java b/platform/lang-api/src/com/intellij/execution/ui/RunContentDescriptor.java index 645f35a26f69..f3e839b6ed01 100644 --- a/platform/lang-api/src/com/intellij/execution/ui/RunContentDescriptor.java +++ b/platform/lang-api/src/com/intellij/execution/ui/RunContentDescriptor.java @@ -18,7 +18,6 @@ package com.intellij.execution.ui; import com.intellij.execution.process.ProcessHandler; import com.intellij.ide.DataManager; import com.intellij.openapi.actionSystem.DataProvider; -import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.util.Disposer; import com.intellij.ui.content.Content; @@ -44,7 +43,6 @@ public class RunContentDescriptor { public RunContentDescriptor(final ExecutionConsole executionConsole, final ProcessHandler processHandler, final JComponent component, final String displayName, final Icon icon) { - LOG.assertTrue(executionConsole != null || ApplicationManager.getApplication().isUnitTestMode()); myExecutionConsole = executionConsole; myProcessHandler = processHandler; myComponent = component; @@ -71,7 +69,9 @@ public class RunContentDescriptor { } public void dispose() { - Disposer.dispose(myExecutionConsole); + if (myExecutionConsole != null) { + Disposer.dispose(myExecutionConsole); + } } @Nullable