DESCRIPTION

Bug 493347 - NullPointerException when image has no tags

Prevent NPE in DockerConnection#listImages() and
DockerConnection#listContainers() when tags or status is missing

Change-Id: I0fd56e762ef038a05fd54dee7944863e0af96b9e
Signed-off-by: Zechariah Krause xxx@xxx.xxx


COMMENTS

author: Zechariah Krause
date: 2016-05-11 10:12:05.000000000

Uploaded patch set 1.

-------------------------------------
author: Brenden Conley
date: 2016-05-11 10:12:11.000000000

Patch Set 1:

Build Started https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/10765/

-------------------------------------
author: Brenden Conley
date: 2016-05-11 10:37:38.000000000

Patch Set 1: Verified+1

Build Successful 

https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/10765/ : SUCCESS

-------------------------------------
author: Nathanael Holden
date: 2016-05-11 18:09:03.000000000

Patch Set 1: Code-Review-1

(2 comments)

Overall this looks fine, just a few questions and possible changes.

Line:593, containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/internal/docker/core/DockerConnection.java -> Is there any case where status() is null, or any reason to believe it could be null ?

Line:74, containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/internal/docker/core/DockerImage.java -> Is there any case where we pass in a null created date ?

-------------------------------------
author: Kaylin Maxwell
date: 2016-05-11 18:32:04.000000000

Patch Set 1:

(1 comment)

Line:74, containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/internal/docker/core/DockerImage.java -> This would only be if the request data didn't come back with a Created field.  I personally think the BusyBox image is an abomination and should be replaced with one with tags which is why this bug was originally opened.  An image without a creation date might likewise considered incomplete, but in the interest of plugging future issues, so be it.  The cost of the check is negligible.

-------------------------------------
author: Zechariah Krause
date: 2016-05-12 06:57:51.000000000

Patch Set 1:

(2 comments)

Line:74, containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/internal/docker/core/DockerImage.java -> This happened only with a Mock Image that I used in my tests, but I think it's still worth checking for a null value.

Line:74, containers/org.eclipse.linuxtools.docker.core/src/org/eclipse/linuxtools/internal/docker/core/DockerImage.java -> As I wrote above, the null date (and status) occurred on a Mock Image during the test, but I thought it would be worth checking null values. BusyBox really returns a null list of tags, though.

-------------------------------------
author: Gerrit Code Review
date: 2016-05-12 18:02:12.000000000

Change has been successfully cherry-picked as 8f0cbdfba68c76dd71269dd5a212de8a16bf4d69 by Kaylin Maxwell

-------------------------------------
