Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreutarass2009-09-09 19:20:27 +0000
committereutarass2009-09-09 19:20:27 +0000
commit6e1c5a720c55c6c8382bf3ea432778d8eef74f8e (patch)
tree358defd4c5432322b15ff71223d47cdae0ea56da
parentc6942de9013767f7fc2a1e42c0f41d9b23115f11 (diff)
downloadorg.eclipse.tcf-6e1c5a720c55c6c8382bf3ea432778d8eef74f8e.tar.gz
org.eclipse.tcf-6e1c5a720c55c6c8382bf3ea432778d8eef74f8e.tar.xz
org.eclipse.tcf-6e1c5a720c55c6c8382bf3ea432778d8eef74f8e.zip
Fixed: Unhandled IllegalStateException when TCF is shut down while a channel is open
-rw-r--r--plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/AbstractChannel.java30
-rw-r--r--plugins/org.eclipse.tm.tcf/src/org/eclipse/tm/tcf/EventQueue.java2
2 files changed, 21 insertions, 11 deletions
diff --git a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/AbstractChannel.java b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/AbstractChannel.java
index 15b679330..2ff3a188d 100644
--- a/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/AbstractChannel.java
+++ b/plugins/org.eclipse.tm.tcf.core/src/org/eclipse/tm/tcf/core/AbstractChannel.java
@@ -277,11 +277,16 @@ public abstract class AbstractChannel implements IChannel {
});
}
catch (final Throwable x) {
- Protocol.invokeLater(new Runnable() {
- public void run() {
- terminate(x);
- }
- });
+ try {
+ Protocol.invokeLater(new Runnable() {
+ public void run() {
+ terminate(x);
+ }
+ });
+ }
+ catch (IllegalStateException y) {
+ // TCF event dispatcher has shut down
+ }
}
}
};
@@ -351,11 +356,16 @@ public abstract class AbstractChannel implements IChannel {
flush();
}
catch (final Throwable x) {
- Protocol.invokeLater(new Runnable() {
- public void run() {
- terminate(x);
- }
- });
+ try {
+ Protocol.invokeLater(new Runnable() {
+ public void run() {
+ terminate(x);
+ }
+ });
+ }
+ catch (IllegalStateException y) {
+ // TCF event dispatcher has shut down
+ }
}
}
};
diff --git a/plugins/org.eclipse.tm.tcf/src/org/eclipse/tm/tcf/EventQueue.java b/plugins/org.eclipse.tm.tcf/src/org/eclipse/tm/tcf/EventQueue.java
index e9fd42237..738f7869f 100644
--- a/plugins/org.eclipse.tm.tcf/src/org/eclipse/tm/tcf/EventQueue.java
+++ b/plugins/org.eclipse.tm.tcf/src/org/eclipse/tm/tcf/EventQueue.java
@@ -107,7 +107,7 @@ class EventQueue implements IEventQueue, Runnable {
public synchronized void invokeLater(final Runnable r) {
assert r != null;
- if (shutdown) throw new IllegalStateException("TCF event dispatch is shutdown"); //$NON-NLS-1$
+ if (shutdown) throw new IllegalStateException("TCF event dispatcher has shut down"); //$NON-NLS-1$
queue.add(r);
if (waiting) {
waiting = false;

Back to the top