Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2013-03-30 05:16:27 -0400
committerUwe Stieber2013-03-30 05:16:27 -0400
commit2cb83f457e29e7aa489a7b026899800136bfc996 (patch)
tree822cf8262d7b96b988e20f99029d7c0dbb7377f1 /plugins
parentd52627cf4f550f8f7ace09ee0b6e6d3634c05162 (diff)
downloadorg.eclipse.tcf-2cb83f457e29e7aa489a7b026899800136bfc996.tar.gz
org.eclipse.tcf-2cb83f457e29e7aa489a7b026899800136bfc996.tar.xz
org.eclipse.tcf-2cb83f457e29e7aa489a7b026899800136bfc996.zip
TCF Core: Avoid IllegalStateException on shutdown in non-debug mode
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.tcf/src/org/eclipse/tcf/EventQueue.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/plugins/org.eclipse.tcf/src/org/eclipse/tcf/EventQueue.java b/plugins/org.eclipse.tcf/src/org/eclipse/tcf/EventQueue.java
index 5fd4f564e..f3540a673 100644
--- a/plugins/org.eclipse.tcf/src/org/eclipse/tcf/EventQueue.java
+++ b/plugins/org.eclipse.tcf/src/org/eclipse/tcf/EventQueue.java
@@ -12,6 +12,7 @@ package org.eclipse.tcf;
import java.util.LinkedList;
+import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.jobs.IJobChangeEvent;
import org.eclipse.core.runtime.jobs.IJobChangeListener;
import org.eclipse.core.runtime.jobs.Job;
@@ -102,7 +103,12 @@ class EventQueue implements IEventQueue, Runnable {
public synchronized void invokeLater(final Runnable r) {
assert r != null;
- if (shutdown) throw new IllegalStateException("TCF event dispatcher has shut down"); //$NON-NLS-1$
+ if (shutdown) {
+ // If not in debug mode, silently ignore this case to avoid
+ // confusion and bad impression to the user.
+ if (Platform.inDebugMode()) throw new IllegalStateException("TCF event dispatcher has shut down"); //$NON-NLS-1$
+ else return;
+ }
queue.add(r);
if (waiting) {
waiting = false;

Back to the top