> + while (q.size() > 1)
> + q = hashQueue(q);
> +
> + this.treeHash = q.poll().toString();
> + this.hash = hasher.hash().toString();
> + is.close();
> + }
> +
> + /**
> + * Gets the hash of the payload. Builds the hash if it was not
> initialized yet.
> + *
> + * @return A String containing the calculated hash.
> + */
> + public String getHash() throws IOException {
> + if (hash == null)
> + this.buildHashes();
Could you eagerly call `buildHashes` in the constructor or factory method
instead of lazily doing so?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-aws/pull/9/files#r13771603