> + private static ArrayList<HashCode> hashList(ArrayList<HashCode>
> hashList) {
> + ArrayList<HashCode> result = Lists.newArrayList();
> + //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);
> + }
> + }
> + return result.size() > 1 ? hashList(result) :
Do you need recursion, or would a `while (result.size())` loop suffice?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-aws/pull/11/files#r13826007