summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRob Stryker2013-05-15 02:30:35 (EDT)
committerRob Stryker2013-05-15 02:31:12 (EDT)
commitb4ca3899db3f9020633605d57553d4cc08230057 (patch)
tree2f7054420210fc4c5e6b79ca0a2492a5694832c7
parent2f66eaa0919553d9b763b34a6d1cf813505d8e1c (diff)
downloadwebtools.common-b4ca3899db3f9020633605d57553d4cc08230057.zip
webtools.common-b4ca3899db3f9020633605d57553d4cc08230057.tar.gz
webtools.common-b4ca3899db3f9020633605d57553d4cc08230057.tar.bz2
[407219] concurrent modification exception in new GlobalHeirarchyParticipantv201305151500R3_5_0
-rw-r--r--plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/flat/GlobalHeirarchyParticipant.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/flat/GlobalHeirarchyParticipant.java b/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/flat/GlobalHeirarchyParticipant.java
index 76d835f..11c6cd3 100644
--- a/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/flat/GlobalHeirarchyParticipant.java
+++ b/plugins/org.eclipse.wst.common.modulecore/modulecore-src/org/eclipse/wst/common/componentcore/internal/flat/GlobalHeirarchyParticipant.java
@@ -30,7 +30,7 @@ import org.eclipse.wst.common.componentcore.resources.IVirtualReference;
* to accept child module nestings it may otherwise be unable to know about.
*/
public class GlobalHeirarchyParticipant extends AbstractFlattenParticipant {
- private ArrayList<IFlattenParticipant> list = new ArrayList<IFlattenParticipant>();
+ private ArrayList<IFlattenParticipant> list = null;
@Override
public boolean isChildModule(IVirtualComponent rootComponent,
@@ -55,7 +55,11 @@ public class GlobalHeirarchyParticipant extends AbstractFlattenParticipant {
return false;
}
- private void ensureLoaded() {
+ private synchronized void ensureLoaded() {
+ if( list != null )
+ return;
+
+ list = new ArrayList<IFlattenParticipant>();
IExtensionRegistry registry = Platform.getExtensionRegistry();
IConfigurationElement[] cf2 = registry.getConfigurationElementsFor(ModulecorePlugin.PLUGIN_ID, "heirarchyFlattenParticipant"); //$NON-NLS-1$
for( int i = 0; i < cf2.length; i++ ) {