> +         while (hashList.size() > 1) {
> +            //Hash pairs of values and add them to the result list.
> +            for (Iterator<HashCode> it = hashList.iterator(); it.hasNext();) 
> {
> +               HashCode hc1 = it.next();
> +               if (it.hasNext()) {
> +                   HashCode hc2 = it.next();
> +                   result.add(Hashing.sha256().newHasher()
> +                         .putBytes(hc1.asBytes())
> +                         .putBytes(hc2.asBytes())
> +                         .hash());
> +               } else {
> +                  result.add(hc1);
> +               }
> +            }
> +            hashList = result;
> +            result = Lists.newArrayList();

ImmutableList.of() (and perhaps use an immutable list builder in place of the 
array list)? Or are we interested in specific performance characteristics of 
`ArrayList` here?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-aws/pull/11/files#r13840862

Reply via email to