> protected String imageIdForZone(String zoneId) {
> ImageApi imageApi = api.getImageApiForZone(zoneId);
> - return Iterables.getLast(imageApi.list().concat()).getId();
> + return Iterables.getFirst(imageApi.list().concat(), null).getId();
How about "Iterables.get(..., 0)" then? That would throw an
IndexOutOfBoundsException on an empty iterable, which is perhaps saner in this
case? And could you put your explanation regarding the "lighter" images in an
short code comment?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/355/files#r12071858