jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Daggett <notificati...@github.com>
Subject Re: [jclouds] Prefer OpenStack Regions (#463)
Date Thu, 14 Aug 2014 16:36:40 GMT
>           assertTrue(instanceApi.list().size() >= 2);
> -         for (Instance instance : instancesToDelete.get(zone)) {
> -            DatabaseApi databaseApi = api.getDatabaseApiForZoneAndInstance(zone, instance.getId());
> +         for (Instance instance : instancesToDelete.get(region)) {
> +            DatabaseApi databaseApi = api.getDatabaseApi(region, instance.getId());
>              if (!instance.getName().contains("database_testing"))
>                 continue;
>              assertTrue(databaseApi.list().size() >= 1);

@demobox @zack-shoylev Yesterday, I prototyped changing all collection related `size()` methods
from/to:
- `size() > 0` -> `!isEmpty()`
- `size() == 0` ->  `isEmpty()`
- `size() != 0` -> `!isEmpty()`
- `Iterables.size(collection) > 0` -> `Iterables.isEmpty(collection)`

WDYT? If using `isEmpty()` is preferred, then we should document this in the best practices!


---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/463/files#r16249507
Mime
View raw message