mirror of https://github.com/apache/jclouds.git
Follow-up to Azureblob cleanup
See discussion at https://github.com/jclouds/jclouds/pull/66
This commit is contained in:
parent
e14e23be52
commit
c6facc13d6
|
@ -82,7 +82,7 @@ public class AzureBlobBlockUploadStrategy implements MultipartUploadStrategy {
|
||||||
blockIds.add(blockId);
|
blockIds.add(blockId);
|
||||||
client.putBlock(container, blobName, blockId, block);
|
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);
|
return client.putBlockList(container, blobName, blockIds);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,7 @@ import org.jclouds.predicates.Validator;
|
||||||
@Singleton
|
@Singleton
|
||||||
public class BlockIdValidator extends Validator<String> {
|
public class BlockIdValidator extends Validator<String> {
|
||||||
@Override
|
@Override
|
||||||
public void validate(String s) throws IllegalArgumentException {
|
public void validate(@Nullable String s) throws IllegalArgumentException {
|
||||||
if (s == null || s.length() > 64)
|
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");
|
throw new IllegalArgumentException("block id:" + s + "; Block Ids must be less than or equal to 64 bytes in size");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue