diff --git a/blobstore/src/main/java/org/jclouds/blobstore/domain/internal/BlobBuilderImpl.java b/blobstore/src/main/java/org/jclouds/blobstore/domain/internal/BlobBuilderImpl.java index 2f0cf19183..2069220abf 100644 --- a/blobstore/src/main/java/org/jclouds/blobstore/domain/internal/BlobBuilderImpl.java +++ b/blobstore/src/main/java/org/jclouds/blobstore/domain/internal/BlobBuilderImpl.java @@ -178,6 +178,7 @@ public class BlobBuilderImpl implements BlobBuilder { @Override public PayloadBlobBuilder contentLength(long contentLength) { + checkArgument(contentLength >= 0, "content length must be non-negative"); payload.getContentMetadata().setContentLength(contentLength); return this; }