Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Arthorne2010-03-15 17:36:30 +0000
committerJohn Arthorne2010-03-15 17:36:30 +0000
commit37439dd0e117ed054c74119f415ea16b61736fff (patch)
treefcb4dd97e9b267a3966be6fe25236a3fe96e2221
parent43c424e3d9460944fa65fac8b0b4e3c9321252d3 (diff)
downloadrt.equinox.bundles-37439dd0e117ed054c74119f415ea16b61736fff.tar.gz
rt.equinox.bundles-37439dd0e117ed054c74119f415ea16b61736fff.tar.xz
rt.equinox.bundles-37439dd0e117ed054c74119f415ea16b61736fff.zip
Bug 305863 - org.eclipse.core.internal.runtime.AdapterManager is not thread safev20100315
-rw-r--r--bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/AdapterManager.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/AdapterManager.java b/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/AdapterManager.java
index 447f6dd6d..e74ec9657 100644
--- a/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/AdapterManager.java
+++ b/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/AdapterManager.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2009 IBM Corporation and others.
+ * Copyright (c) 2000, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -8,6 +8,7 @@
* Contributors:
* IBM Corporation - initial API and implementation
* David Green - fix factories with non-standard class loading (bug 200068)
+ * Filip Hrbek - fix thread safety problem described in bug 305863
*******************************************************************************/
package org.eclipse.core.internal.runtime;
@@ -418,9 +419,6 @@ public final class AdapterManager implements IAdapterManager {
}
public HashMap getFactories() {
- // avoid the synchronize if we don't have to call it
- if (lazyFactoryProviders.size() == 0)
- return factories;
synchronized (lazyFactoryProviders) {
while (lazyFactoryProviders.size() > 0) {
IAdapterManagerProvider provider = (IAdapterManagerProvider) lazyFactoryProviders.remove(0);

Back to the top