jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (JCLOUDS-1153) Docker ImageToImage class doesn't support empty repoTags list
Date Fri, 12 Aug 2016 07:38:20 GMT

    [ https://issues.apache.org/jira/browse/JCLOUDS-1153?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15418468#comment-15418468
] 

ASF subversion and git services commented on JCLOUDS-1153:
----------------------------------------------------------

Commit 05a5ae2ebd64895fc4ccd639d85b484968d7fb3b in jclouds-labs's branch refs/heads/master
from [~kwart]
[ https://git-wip-us.apache.org/repos/asf?p=jclouds-labs.git;h=05a5ae2 ]

JCLOUDS-1153 Fix empty Docker repoTags field in ImageToImage function


> 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: 2.0.0
>         Environment: Docker version 1.12
>            Reporter: Josef Cacek
>              Labels: docker
>
> 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)

Mime
View raw message