> @@ -81,7 +82,7 @@ public String execute(String container, Blob blob) {
> blockIds.add(blockId);
> client.putBlock(container, blobName, blockId, block);
> }
> - assert bytesWritten == length;
> + checkState(bytesWritten == length, "Wrote " + bytesWritten + " bytes,
> but we wanted to write " + length + " bytes");
For what it's worth, this can also be written using the ["placeholder form" of
`checkState`](http://guava-libraries.googlecode.com/svn-history/r14/trunk/javadoc/com/google/common/base/Preconditions.html#checkState\(boolean,
java.lang.String, java.lang.Object...\)) as
```
checkState(bytesWritten == length, "Wrote %s bytes, but we wanted to write %s
bytes", bytesWritten, length);
```
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/66/files#r5156785