Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Johnston2019-06-04 14:17:02 -0400
committerJeff Johnston2019-06-04 15:18:56 -0400
commit1e037ba754c52cc391fe80dec5148077ed4fe737 (patch)
tree2ba3e3e110fd48ab1dde2b106772fb89932bf923
parent5ea635d75719d9f6e1226fb3efdbb941c5df336a (diff)
downloadorg.eclipse.linuxtools-1e037ba754c52cc391fe80dec5148077ed4fe737.tar.gz
org.eclipse.linuxtools-1e037ba754c52cc391fe80dec5148077ed4fe737.tar.xz
org.eclipse.linuxtools-1e037ba754c52cc391fe80dec5148077ed4fe737.zip
Bug 547929 - CoModException below ContainerGCCToolChainProvider$2.run
- change DockerConnection temp images list to be a CopyOnWriteArrayList to prevent ConcurrentModificationException when responding to a ChangeEvent Change-Id: I01f728e1ce3cfcdf8cadddaef8754ef8e0441739 Reviewed-on: https://git.eclipse.org/r/143296 Tested-by: Linux Tools Bot <linuxtools-bot@eclipse.org> Reviewed-by: Jeff Johnston <jjohnstn@redhat.com>
-rw-r--r--containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/internal/docker/core/DockerConnection.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/internal/docker/core/DockerConnection.java b/containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/internal/docker/core/DockerConnection.java
index 81008c6185..71c855a23f 100644
--- a/containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/internal/docker/core/DockerConnection.java
+++ b/containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/internal/docker/core/DockerConnection.java
@@ -34,6 +34,7 @@ import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
+import java.util.concurrent.CopyOnWriteArrayList;
import javax.ws.rs.ProcessingException;
@@ -1078,7 +1079,7 @@ public class DockerConnection
// TODO: remove this method from the API
@Override
public List<IDockerImage> listImages() throws DockerException {
- final List<IDockerImage> tempImages = new ArrayList<>();
+ final List<IDockerImage> tempImages = new CopyOnWriteArrayList<>();
synchronized (imageLock) {
try {
final List<Image> nativeImages = new ArrayList<>();

Back to the top