Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Coulon2015-11-17 13:43:29 +0000
committerXavier Coulon2015-11-19 09:34:56 +0000
commit9f8f13d4ca80a7f3828dcaf46cab536dbe9a23eb (patch)
tree16919fe798a11e09fbf0ba8a91ca8b19712ec0b8 /containers/org.eclipse.linuxtools.docker.core/src/org/eclipse
parent7af63ca52bb9711892c961096e02eeca11a86ca4 (diff)
downloadorg.eclipse.linuxtools-9f8f13d4ca80a7f3828dcaf46cab536dbe9a23eb.tar.gz
org.eclipse.linuxtools-9f8f13d4ca80a7f3828dcaf46cab536dbe9a23eb.tar.xz
org.eclipse.linuxtools-9f8f13d4ca80a7f3828dcaf46cab536dbe9a23eb.zip
Bug 481562 - Docker Image label in Docker explorer badly displayed when contains registry
Change-Id: Ie3ffacc942329d6e4ff54a03d0bc3201e6a4479a Signed-off-by: Xavier Coulon <xcoulon@redhat.com> Reviewed-on: https://git.eclipse.org/r/60610 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/internal/docker/core/DockerImage.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/internal/docker/core/DockerImage.java b/containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/internal/docker/core/DockerImage.java
index 4bb3444096..a29a124d1d 100644
--- a/containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/internal/docker/core/DockerImage.java
+++ b/containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/internal/docker/core/DockerImage.java
@@ -71,7 +71,7 @@ public class DockerImage implements IDockerImage {
public static Map<String, List<String>> extractTagsByRepo(final List<String> repoTags) {
final Map<String, List<String>> results = new HashMap<>();
for(String entry : repoTags) {
- final int indexOfColonChar = entry.indexOf(':');
+ final int indexOfColonChar = entry.lastIndexOf(':');
final String repo = (indexOfColonChar > -1) ? entry.substring(0, indexOfColonChar) : entry;
if(!results.containsKey(repo)) {
results.put(repo, new ArrayList<String>());
@@ -95,7 +95,7 @@ public class DockerImage implements IDockerImage {
}
final List<String> tags = new ArrayList<>();
for(String repoTag : repoTags) {
- final int indexOfColonChar = repoTag.indexOf(':');
+ final int indexOfColonChar = repoTag.lastIndexOf(':');
if(indexOfColonChar == -1) {
continue;
}

Back to the top