> + 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();
What would be the advantage of using an ImmutableList builder vs an ArrayList?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-aws/pull/11/files#r13847477