diff --git a/gcloud-java-storage/src/main/java/com/google/gcloud/storage/Blob.java b/gcloud-java-storage/src/main/java/com/google/gcloud/storage/Blob.java index d52b15eae8c2..ebad11150663 100644 --- a/gcloud-java-storage/src/main/java/com/google/gcloud/storage/Blob.java +++ b/gcloud-java-storage/src/main/java/com/google/gcloud/storage/Blob.java @@ -109,13 +109,11 @@ public Blob(Storage storage, BlobInfo info) { */ public Blob(Storage storage, String bucket, String blob) { this.storage = checkNotNull(storage); - this.info = BlobInfo.of(bucket, blob); + this.info = BlobInfo.of(checkNotNull(bucket), checkNotNull(blob)); } /** - * Get the blobs's information. - * - * @return a {@code BlobInfo} object for this blob + * Return the blob's information. */ public BlobInfo info() { return info; @@ -135,7 +133,6 @@ public boolean exists() { * Return this blob's content. * * @param options blob read options - * @return the blob's content * @throws StorageException upon failure */ public byte[] content(Storage.BlobSourceOption... options) { @@ -199,10 +196,9 @@ public Blob copyTo(BlobInfo target, Iterable sourceOptions, } /** - * Return a channel for reading this blob's content. + * Return a {@code BlobReadChannel} object for reading this blob's content. * * @param options blob read options - * @return a {@code BlobReadChannel} object to read this blob * @throws StorageException upon failure */ public BlobReadChannel reader(BlobSourceOption... options) { @@ -210,10 +206,9 @@ public BlobReadChannel reader(BlobSourceOption... options) { } /** - * Return a channel for writing to this blob. + * Return a {@code BlobWriteChannel} object for writing to this blob. * * @param options target blob options - * @return a {@code BlobWriteChannel} object for writing to this blob * @throws StorageException upon failure */ public BlobWriteChannel writer(BlobTargetOption... options) { @@ -236,9 +231,7 @@ public URL signUrl(long expirationTimeInSeconds, SignUrlOption... options) { } /** - * Get this blobs's {@code Storage} object. - * - * @return the storage service used by this blob to issue requests + * Return the blob's {@code Storage} object used to issue requests. */ public Storage storage() { return storage; diff --git a/gcloud-java-storage/src/main/java/com/google/gcloud/storage/Bucket.java b/gcloud-java-storage/src/main/java/com/google/gcloud/storage/Bucket.java index 56d27c3c621f..77c16c106e57 100644 --- a/gcloud-java-storage/src/main/java/com/google/gcloud/storage/Bucket.java +++ b/gcloud-java-storage/src/main/java/com/google/gcloud/storage/Bucket.java @@ -57,13 +57,11 @@ public Bucket(Storage storage, BucketInfo info) { */ public Bucket(Storage storage, String bucket) { this.storage = checkNotNull(storage); - this.info = BucketInfo.of(bucket); + this.info = BucketInfo.of(checkNotNull(bucket)); } /** - * Get the bucket's information. - * - * @return a {@code BucketInfo} object for this bucket + * Return the bucket's information. */ public BucketInfo info() { return info; @@ -103,10 +101,9 @@ public boolean delete(BucketSourceOption... options) { } /** - * List blobs in this bucket. + * Return the paginated list of {@code Blob} in this bucket. * * @param options options for listing blobs - * @return the paginated list of {@code Blob} objects in this bucket * @throws StorageException upon failure */ public ListResult list(Storage.BlobListOption... options) { @@ -118,7 +115,6 @@ public ListResult list(Storage.BlobListOption... options) { * * @param blob name of the requested blob * @param options blob search options - * @return the requested blob in this bucket or {@code null} if not found * @throws StorageException upon failure */ public Blob get(String blob, BlobSourceOption... options) { @@ -129,7 +125,6 @@ public Blob get(String blob, BlobSourceOption... options) { * Return a list of requested blobs in this bucket. Blobs that do not exist are null. * * @param blobNames names of the requested blobs - * @return a list containing the requested blobs in this bucket * @throws StorageException upon failure */ public List getAll(String... blobNames) { @@ -161,9 +156,7 @@ Blob create(String blob, byte[] content, BlobTargetOption... options) { } /** - * Get this bucket's {@code Storage} object. - * - * @return the storage service used by this bucket to issue requests + * Return the bucket's {@code Storage} object used to issue requests. */ public Storage storage() { return storage;