You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jclouds.apache.org by "Ignasi Barrera (JIRA)" <ji...@apache.org> on 2016/08/12 07:41:22 UTC

[jira] [Updated] (JCLOUDS-1153) Docker ImageToImage class doesn't support empty repoTags list

     [ https://issues.apache.org/jira/browse/JCLOUDS-1153?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ignasi Barrera updated JCLOUDS-1153:
------------------------------------
    Affects Version/s:     (was: 2.0.0)
                       1.9.2

> Docker ImageToImage class doesn't support empty repoTags list
> -------------------------------------------------------------
>
>                 Key: JCLOUDS-1153
>                 URL: https://issues.apache.org/jira/browse/JCLOUDS-1153
>             Project: jclouds
>          Issue Type: Bug
>          Components: jclouds-labs
>    Affects Versions: 1.9.2
>         Environment: Docker version 1.12
>            Reporter: Josef Cacek
>              Labels: docker
>             Fix For: 2.0.0
>
>
> When a Docker image doesn't contain any repoTag, then the `ImageToImage` function fails with 
> {code}
> java.lang.IndexOutOfBoundsException: position (1) must be less than the number of elements that remained (1)
> {code}
> So the current implementation of listing Docker images fails when there is an image with empty {{repoTags}} field. (E.g. It happens after pulling a new "latest" tag of an image and the original image didn't have any other tags).
> IMO the original intention was to throw NPE by this call in the {{ImageToImage.apply()}} method:
> {code}
> String description = checkNotNull(Iterables.getFirst(from.repoTags(), "image must have at least one repo tag"));
> {code}
> but it instead sets the {{description}} to {{"image must have at least one repo tag"}} and it fails later on splitting the value.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)