From 2ebde8c556afa92fabf51ab535321d84760aef2b Mon Sep 17 00:00:00 2001 From: Andrew Phillips Date: Wed, 17 Jul 2013 10:19:43 -0400 Subject: [PATCH] Follow-up to Azureblob cleanup See discussion at https://github.com/jclouds/jclouds/pull/66 --- .../blobstore/strategy/AzureBlobBlockUploadStrategy.java | 2 +- .../azureblob/predicates/validators/BlockIdValidator.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/providers/azureblob/src/main/java/org/jclouds/azureblob/blobstore/strategy/AzureBlobBlockUploadStrategy.java b/providers/azureblob/src/main/java/org/jclouds/azureblob/blobstore/strategy/AzureBlobBlockUploadStrategy.java index 44755551fb..dc4cb5d6d1 100644 --- a/providers/azureblob/src/main/java/org/jclouds/azureblob/blobstore/strategy/AzureBlobBlockUploadStrategy.java +++ b/providers/azureblob/src/main/java/org/jclouds/azureblob/blobstore/strategy/AzureBlobBlockUploadStrategy.java @@ -82,7 +82,7 @@ public class AzureBlobBlockUploadStrategy implements MultipartUploadStrategy { blockIds.add(blockId); client.putBlock(container, blobName, blockId, block); } - checkState(bytesWritten == length, "Wrote " + bytesWritten + " bytes, but we wanted to write " + length + " bytes"); + checkState(bytesWritten == length, "Wrote %s bytes, but we wanted to write %s bytes", bytesWritten, length); return client.putBlockList(container, blobName, blockIds); } } diff --git a/providers/azureblob/src/main/java/org/jclouds/azureblob/predicates/validators/BlockIdValidator.java b/providers/azureblob/src/main/java/org/jclouds/azureblob/predicates/validators/BlockIdValidator.java index cd6d53f771..c3ecedb88e 100644 --- a/providers/azureblob/src/main/java/org/jclouds/azureblob/predicates/validators/BlockIdValidator.java +++ b/providers/azureblob/src/main/java/org/jclouds/azureblob/predicates/validators/BlockIdValidator.java @@ -33,7 +33,7 @@ import org.jclouds.predicates.Validator; @Singleton public class BlockIdValidator extends Validator { @Override - public void validate(String s) throws IllegalArgumentException { + public void validate(@Nullable String s) throws IllegalArgumentException { if (s == null || s.length() > 64) throw new IllegalArgumentException("block id:" + s + "; Block Ids must be less than or equal to 64 bytes in size");