Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Johnston2016-02-29 18:15:17 +0000
committerJeff Johnston2016-03-17 17:23:01 +0000
commit2075fc1f752cbfc7b5e17943d21f9f9c45136c1b (patch)
tree162c4fc68968653df9aed408ed3715edfd91cd43
parent35b3c523f2aa6c9ea72880fd163b65af57eecd19 (diff)
downloadorg.eclipse.linuxtools-2075fc1f752cbfc7b5e17943d21f9f9c45136c1b.tar.gz
org.eclipse.linuxtools-2075fc1f752cbfc7b5e17943d21f9f9c45136c1b.tar.xz
org.eclipse.linuxtools-2075fc1f752cbfc7b5e17943d21f9f9c45136c1b.zip
Bug 488712 - IndexOutOfBoundsException below DockerContainer.name
- add check for names list being null or empty Change-Id: I20f1396024bab4b260956b42dcc3e34f3640dda4 Reviewed-on: https://git.eclipse.org/r/67562 Tested-by: Hudson CI Reviewed-by: Jeff Johnston <jjohnstn@redhat.com> Reviewed-on: https://git.eclipse.org/r/68701
-rw-r--r--containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/internal/docker/core/DockerContainer.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/internal/docker/core/DockerContainer.java b/containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/internal/docker/core/DockerContainer.java
index e62f220728..8818ce1a9f 100644
--- a/containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/internal/docker/core/DockerContainer.java
+++ b/containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/internal/docker/core/DockerContainer.java
@@ -139,7 +139,9 @@ public class DockerContainer implements IDockerContainer {
@Override
public String name() {
- return names.get(0);
+ if (names != null && names.size() > 0)
+ return names.get(0);
+ return ""; //$NON-NLS-1$
}
@Override

Back to the top