Skip to content

Commit 8591284

Browse files
committed
Remove redundant return from Blob and Bucket javadoc
1 parent c1f018c commit 8591284

2 files changed

Lines changed: 9 additions & 23 deletions

File tree

gcloud-java-storage/src/main/java/com/google/gcloud/storage/Blob.java

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,11 @@ public Blob(Storage storage, BlobInfo info) {
109109
*/
110110
public Blob(Storage storage, String bucket, String blob) {
111111
this.storage = checkNotNull(storage);
112-
this.info = BlobInfo.of(bucket, blob);
112+
this.info = BlobInfo.of(checkNotNull(bucket), checkNotNull(blob));
113113
}
114114

115115
/**
116-
* Get the blobs's information.
117-
*
118-
* @return a {@code BlobInfo} object for this blob
116+
* Return the blob's information.
119117
*/
120118
public BlobInfo info() {
121119
return info;
@@ -135,7 +133,6 @@ public boolean exists() {
135133
* Return this blob's content.
136134
*
137135
* @param options blob read options
138-
* @return the blob's content
139136
* @throws StorageException upon failure
140137
*/
141138
public byte[] content(Storage.BlobSourceOption... options) {
@@ -199,21 +196,19 @@ public Blob copyTo(BlobInfo target, Iterable<BlobSourceOption> sourceOptions,
199196
}
200197

201198
/**
202-
* Return a channel for reading this blob's content.
199+
* Return a {@code BlobReadChannel} object for reading this blob's content.
203200
*
204201
* @param options blob read options
205-
* @return a {@code BlobReadChannel} object to read this blob
206202
* @throws StorageException upon failure
207203
*/
208204
public BlobReadChannel reader(BlobSourceOption... options) {
209205
return storage.reader(info.bucket(), info.name(), convert(info, options));
210206
}
211207

212208
/**
213-
* Return a channel for writing to this blob.
209+
* Return a {@code BlobWriteChannel} object for writing to this blob.
214210
*
215211
* @param options target blob options
216-
* @return a {@code BlobWriteChannel} object for writing to this blob
217212
* @throws StorageException upon failure
218213
*/
219214
public BlobWriteChannel writer(BlobTargetOption... options) {
@@ -236,9 +231,7 @@ public URL signUrl(long expirationTimeInSeconds, SignUrlOption... options) {
236231
}
237232

238233
/**
239-
* Get this blobs's {@code Storage} object.
240-
*
241-
* @return the storage service used by this blob to issue requests
234+
* Return the blob's {@code Storage} object used to issue requests.
242235
*/
243236
public Storage storage() {
244237
return storage;

gcloud-java-storage/src/main/java/com/google/gcloud/storage/Bucket.java

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,11 @@ public Bucket(Storage storage, BucketInfo info) {
5757
*/
5858
public Bucket(Storage storage, String bucket) {
5959
this.storage = checkNotNull(storage);
60-
this.info = BucketInfo.of(bucket);
60+
this.info = BucketInfo.of(checkNotNull(bucket));
6161
}
6262

6363
/**
64-
* Get the bucket's information.
65-
*
66-
* @return a {@code BucketInfo} object for this bucket
64+
* Return the bucket's information.
6765
*/
6866
public BucketInfo info() {
6967
return info;
@@ -103,10 +101,9 @@ public boolean delete(BucketSourceOption... options) {
103101
}
104102

105103
/**
106-
* List blobs in this bucket.
104+
* Return the paginated list of {@code Blob} in this bucket.
107105
*
108106
* @param options options for listing blobs
109-
* @return the paginated list of {@code Blob} objects in this bucket
110107
* @throws StorageException upon failure
111108
*/
112109
public ListResult<Blob> list(Storage.BlobListOption... options) {
@@ -118,7 +115,6 @@ public ListResult<Blob> list(Storage.BlobListOption... options) {
118115
*
119116
* @param blob name of the requested blob
120117
* @param options blob search options
121-
* @return the requested blob in this bucket or {@code null} if not found
122118
* @throws StorageException upon failure
123119
*/
124120
public Blob get(String blob, BlobSourceOption... options) {
@@ -129,7 +125,6 @@ public Blob get(String blob, BlobSourceOption... options) {
129125
* Return a list of requested blobs in this bucket. Blobs that do not exist are null.
130126
*
131127
* @param blobNames names of the requested blobs
132-
* @return a list containing the requested blobs in this bucket
133128
* @throws StorageException upon failure
134129
*/
135130
public List<Blob> getAll(String... blobNames) {
@@ -161,9 +156,7 @@ Blob create(String blob, byte[] content, BlobTargetOption... options) {
161156
}
162157

163158
/**
164-
* Get this bucket's {@code Storage} object.
165-
*
166-
* @return the storage service used by this bucket to issue requests
159+
* Return the bucket's {@code Storage} object used to issue requests.
167160
*/
168161
public Storage storage() {
169162
return storage;

0 commit comments

Comments
 (0)