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 Tue, 30 Aug 2016 09:36:20 GMT

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

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

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

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: 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)

Mime
View raw message