Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2011-07-04 14:05:53 -0400
committerslewis2011-07-04 14:05:53 -0400
commit2a84c11ea889aa25970af9b3631b005a6b182308 (patch)
treed6fca3561ffab34f0bbb2c1863a4ee62b13a8321
parentbccd2b4653acfaabbf809f85508e93a42b1d4719 (diff)
downloadorg.eclipse.ecf-2a84c11ea889aa25970af9b3631b005a6b182308.tar.gz
org.eclipse.ecf-2a84c11ea889aa25970af9b3631b005a6b182308.tar.xz
org.eclipse.ecf-2a84c11ea889aa25970af9b3631b005a6b182308.zip
Fix for bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=351109
-rw-r--r--framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/client/AbstractClientContainer.java12
1 files changed, 9 insertions, 3 deletions
diff --git a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/client/AbstractClientContainer.java b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/client/AbstractClientContainer.java
index 6e72921d3..50580f150 100644
--- a/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/client/AbstractClientContainer.java
+++ b/framework/bundles/org.eclipse.ecf.remoteservice/src/org/eclipse/ecf/remoteservice/client/AbstractClientContainer.java
@@ -124,7 +124,9 @@ public abstract class AbstractClientContainer extends AbstractContainer implemen
}
public void addRemoteServiceListener(IRemoteServiceListener listener) {
- remoteServiceListeners.add(listener);
+ synchronized (remoteServiceListeners) {
+ remoteServiceListeners.add(listener);
+ }
}
public IFuture asyncGetRemoteServiceReferences(final ID[] idFilter, final String clazz, final String filter) {
@@ -209,7 +211,9 @@ public abstract class AbstractClientContainer extends AbstractContainer implemen
}
public void removeRemoteServiceListener(IRemoteServiceListener listener) {
- remoteServiceListeners.remove(listener);
+ synchronized (remoteServiceListeners) {
+ remoteServiceListeners.remove(listener);
+ }
}
public boolean ungetRemoteService(final IRemoteServiceReference reference) {
@@ -331,7 +335,9 @@ public abstract class AbstractClientContainer extends AbstractContainer implemen
public void dispose() {
disconnect();
- remoteServiceListeners.clear();
+ synchronized (remoteServiceListeners) {
+ remoteServiceListeners.clear();
+ }
super.dispose();
}

Back to the top