> +
> + String username = args[0];
> + String apiKey = args[1];
> +
> + api = ContextBuilder.newBuilder(provider)
> + .credentials(username, apiKey)
> + .buildApi(TroveApi.class);
> +
> + flavorApi = api.getFlavorApiForZone(Constants.ZONE);
> + }
> +
> + /**
> + * @return Flavor The first Flavor available
> + */
> + private Flavor getFlavor() {
> + return flavorApi.list().iterator().next();
Use Iterables.getFirst() instead.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-examples/pull/6/files#r5280630