Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Coulon2015-10-09 07:51:43 +0000
committerXavier Coulon2015-10-09 08:27:19 +0000
commitfe15ba34bef11b18228c22111afbce4061050080 (patch)
treecb8dc02d7df2973b0ee40e634317a09ff4d55704 /containers/org.eclipse.linuxtools.docker.core/src/org/eclipse
parentd7f36dfa7f5fe8168c5bbb759d82f8c849259d9c (diff)
downloadorg.eclipse.linuxtools-fe15ba34bef11b18228c22111afbce4061050080.tar.gz
org.eclipse.linuxtools-fe15ba34bef11b18228c22111afbce4061050080.tar.xz
org.eclipse.linuxtools-fe15ba34bef11b18228c22111afbce4061050080.zip
Bug 479391 - Invalid command state when container is in "Created" status
Added a check for the "Created" status, in which case the container is assumed to be STOPPED. Change-Id: Icbe0068a6b483b03ffddbe5baedd6b2326afcdef Signed-off-by: Xavier Coulon <xcoulon@redhat.com> Reviewed-on: https://git.eclipse.org/r/57769 Tested-by: Hudson CI
Diffstat (limited to 'containers/org.eclipse.linuxtools.docker.core/src/org/eclipse')
-rw-r--r--containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/docker/core/EnumDockerStatus.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/docker/core/EnumDockerStatus.java b/containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/docker/core/EnumDockerStatus.java
index 143eb484b5..981cac4f23 100644
--- a/containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/docker/core/EnumDockerStatus.java
+++ b/containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/docker/core/EnumDockerStatus.java
@@ -26,7 +26,9 @@ public enum EnumDockerStatus {
* @return the corresponding {@link EnumDockerStatus}
*/
public static EnumDockerStatus fromStatusMessage(final String statusMessage) {
- if (statusMessage.startsWith("Exited") || statusMessage.startsWith("Stopped")) {//$NON-NLS-1$
+ if (statusMessage.startsWith("Exited") //$NON-NLS-1$
+ || statusMessage.startsWith("Stopped") //$NON-NLS-1$
+ || statusMessage.startsWith("Created")) {//$NON-NLS-1$
return STOPPED;
} else if (statusMessage.startsWith("Running") && statusMessage.endsWith("(Paused)")) { //$NON-NLS-1$ //$NON-NLS-2$
return PAUSED;

Back to the top