> @@ -47,6 +48,18 @@
>  
>     @Override
>     public Set<CookbookDefinition> apply(HttpResponse response) {
> -      return Sets.newLinkedHashSet(parser.apply(response).values());
> +      Set<Map.Entry<String, CookbookDefinition>> result = 
> parser.apply(response).entrySet();
> +      return Sets.newHashSet(Iterators.transform(result.iterator(), new 
> Function<Map.Entry<String, CookbookDefinition>, CookbookDefinition>() {

`result` is already an `Iterable`, so there is no need to call `iterator()` if 
you use `Iterables.transform`.
Why the change from `LinkedHashSet` to `HashSet` ?
Prefer using static imports for the `Sets` and `Iterables` stuff.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-chef/pull/24/files#r6425831

Reply via email to