DESCRIPTION

Bug 488976 - NullPointer in DockerConnection.hasImage

Refactoring the DockerConnection#listImages() method to the same
 logic as the DockerConnection#listContainers() method, where the
 DockerConnection#images list is guaranteed to be set to a non-null
 list in the finally{} block.

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


COMMENTS

author: Brenden Conley
date: 2016-03-16 14:28:00.000000000

Patch Set 2:

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

-------------------------------------
author: Brenden Conley
date: 2016-03-16 14:55:37.000000000

Patch Set 2: Verified+1

Build Successful 

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

-------------------------------------
author: Nathanael Holden
date: 2016-03-16 15:27:19.000000000

Patch Set 2:

I'm assuming this is targeting 4.2.2. We shouldn't be making changes this drastic to fix a bug that no one has actually reproduced and there are some issues with this change.

- listImages() can still return null. This change does guarantee this.images will always be non-null, because of finally but listImages() can still throw an Exception and it's up to the caller to know to point to 'this.images', as is done in getImages(boolean). I guess this is still a little better than before.

-------------------------------------
author: Kaylin Maxwell
date: 2016-03-16 20:38:53.000000000

Patch Set 2: Code-Review-1

I agree with Roland.  This is a bit of a dicey change to a piece of code that is very thread sensitive and contains locking.  I would prefer a change that simply protected the null list in hasImage for this point release.

-------------------------------------
author: Zechariah Krause
date: 2016-03-17 09:02:26.000000000

Patch Set 2:

ok, I understand your concerns. I'll propose another/simpler patch, then.

-------------------------------------
author: Zechariah Krause
date: 2016-10-03 15:09:59.000000000

Abandoned

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