Skip to main content
summaryrefslogtreecommitdiffstats
path: root/launch
diff options
context:
space:
mode:
authorJeff Johnston2019-05-06 20:12:34 -0400
committerJeff Johnston2019-05-06 20:12:34 -0400
commitdb891f98dd0b4c0c42f70d3559d09629a331b228 (patch)
treea2cbf49474e56066701e4216d88a8273b224c767 /launch
parent0b113d199cc35b934f718607ed164ab6fcf902ee (diff)
downloadorg.eclipse.cdt-db891f98dd0b4c0c42f70d3559d09629a331b228.tar.gz
org.eclipse.cdt-db891f98dd0b4c0c42f70d3559d09629a331b228.tar.xz
org.eclipse.cdt-db891f98dd0b4c0c42f70d3559d09629a331b228.zip
Bug 547026 - fix ConcurrentModificationException
- in ContainerGCCToolChainProvider change collection of toolchains to be an array before accessing to prevent ConcurrentModificationException Change-Id: Ia39ddee181ba814997a34d5b1d68170fe1cda5ce
Diffstat (limited to 'launch')
-rw-r--r--launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/internal/docker/launcher/ui/launchbar/ContainerGCCToolChainProvider.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/internal/docker/launcher/ui/launchbar/ContainerGCCToolChainProvider.java b/launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/internal/docker/launcher/ui/launchbar/ContainerGCCToolChainProvider.java
index 754eec9608..b33f8718bc 100644
--- a/launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/internal/docker/launcher/ui/launchbar/ContainerGCCToolChainProvider.java
+++ b/launch/org.eclipse.cdt.docker.launcher/src/org/eclipse/cdt/internal/docker/launcher/ui/launchbar/ContainerGCCToolChainProvider.java
@@ -164,7 +164,9 @@ public class ContainerGCCToolChainProvider implements IToolChainProvider, IDocke
try {
String connectionURI = connection.getUri();
Collection<IToolChain> toolChains = toolChainManager.getAllToolChains();
- for (IToolChain toolChain : toolChains) {
+ IToolChain[] toolChainArray = toolChains.toArray(new IToolChain[0]);
+ for (int i = 0; i < toolChains.size(); ++i) {
+ IToolChain toolChain = toolChainArray[i];
String uri = toolChain.getProperty(IContainerLaunchTarget.ATTR_CONNECTION_URI);
if (connectionURI.equals(uri)) {
toolChainManager.removeToolChain(toolChain);

Back to the top