> +            try {
> +               Thread.sleep(50);
> +            } catch (InterruptedException ie) {
> +            }
> +
> +            logger.error(e.getStackTrace().toString());
> +            continue;
> +         }
> +
> +         Instance updatedInstance = awaitAvailable(instance, instanceApi);
> +         if (updatedInstance == null) {
> +            instanceApi.delete(instance.getId());
> +            InstancePredicates.awaitDeleted(instanceApi).apply(instance);
> +            continue;
> +         }
> +         return updatedInstance;

Just a style thing, but would it read more easily if the "exit case" were more 
explicit? I.e.
```
if (updatedInstance != null) {
  return updatedInstance;
}
instanceApi.delete(instance.getId());
InstancePredicates.awaitDeleted(instanceApi).apply(instance);
...
```


---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-openstack/pull/12/files#r5111681

Reply via email to