Skip to content

Commit a6269dd

Browse files
committed
---
yaml --- r: 6293 b: refs/heads/tswast-patch-1 c: 77a9dd1 h: refs/heads/master i: 6291: 142c75c
1 parent 7b83929 commit a6269dd

3 files changed

Lines changed: 6 additions & 5 deletions

File tree

  • branches/tswast-patch-1/gcloud-java-storage/src

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,5 @@ refs/tags/v0.18.0: 9d193c4c4b9d1c6f21515dd8e50836b9194ec9bb
5757
refs/tags/v0.19.0: e67b56e4d8dad5f9a7b38c9b2107c23c828f2ed5
5858
refs/tags/v0.20.0: 839f7fb7156535146aa1cb2c5aadd8d375d854e8
5959
refs/tags/v0.20.1: 370471f437f1f4f68a11e068df5cd6bf39edb1fa
60-
refs/heads/tswast-patch-1: 5e1d71b65a1ebd0a05b75cfd51a6f24a42f8635f
60+
refs/heads/tswast-patch-1: 77a9dd163b79322d6166136bdf97bbebd24b8fea
6161
refs/heads/pubsub-streaming-pull: 19262b752ee874eb2ca3b950eb2aef44d5a5267b

branches/tswast-patch-1/gcloud-java-storage/src/main/java/com/google/gcloud/storage/Blob.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,12 @@ public BlobId id() {
150150
/**
151151
* Checks if this blob exists.
152152
*
153+
* @param options blob read options
153154
* @return true if this blob exists, false otherwise
154155
* @throws StorageException upon failure
155156
*/
156-
public boolean exists() {
157-
return storage.get(info.blobId()) != null;
157+
public boolean exists(BlobSourceOption... options) {
158+
return storage.get(info.blobId(), convert(info, options)) != null;
158159
}
159160

160161
/**

branches/tswast-patch-1/gcloud-java-storage/src/test/java/com/google/gcloud/storage/BlobTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,14 @@ public void testInfo() throws Exception {
7070

7171
@Test
7272
public void testExists_True() throws Exception {
73-
expect(storage.get(BLOB_INFO.blobId())).andReturn(BLOB_INFO);
73+
expect(storage.get(BLOB_INFO.blobId(), new Storage.BlobSourceOption[0])).andReturn(BLOB_INFO);
7474
replay(storage);
7575
assertTrue(blob.exists());
7676
}
7777

7878
@Test
7979
public void testExists_False() throws Exception {
80-
expect(storage.get(BLOB_INFO.blobId())).andReturn(null);
80+
expect(storage.get(BLOB_INFO.blobId(), new Storage.BlobSourceOption[0])).andReturn(null);
8181
replay(storage);
8282
assertFalse(blob.exists());
8383
}

0 commit comments

Comments
 (0)