> + @Named(Constants.PROPERTY_USER_THREADS) ListeningExecutorService
> userExecutor) {
> + this.api = api;
> + this.snapshotAvailablePredicate = snapshotAvailablePredicate;
> + this.imageTransformer = imageTransformer;
> + this.userExecutor = userExecutor;
> + }
> +
> + @Override
> + public ImageTemplate buildImageTemplateFromNode(String name, String id) {
> + Server server = api.serverApi().getServer(id);
> +
> + if (server == null)
> + throw new NoSuchElementException("Cannot find server with id: " +
> id);
> +
> + List<Storage> storages = server.storages();
> + if (storages.isEmpty() || !Iterables.tryFind(storages,
> matchBootDevice).isPresent())
`storages.isEmpty()` is redundant, you could remove it. Perhaps it reads better
as: `if (!Iterables.any(storages, matchBootDevice))
`
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/929/files#r54725423