File tree Expand file tree Collapse file tree
branches/tswast-patch-1/gcloud-java-storage/src
main/java/com/google/gcloud/storage
test/java/com/google/gcloud/storage Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -57,5 +57,5 @@ refs/tags/v0.18.0: 9d193c4c4b9d1c6f21515dd8e50836b9194ec9bb
5757refs/tags/v0.19.0: e67b56e4d8dad5f9a7b38c9b2107c23c828f2ed5
5858refs/tags/v0.20.0: 839f7fb7156535146aa1cb2c5aadd8d375d854e8
5959refs/tags/v0.20.1: 370471f437f1f4f68a11e068df5cd6bf39edb1fa
60- refs/heads/tswast-patch-1: 5e1d71b65a1ebd0a05b75cfd51a6f24a42f8635f
60+ refs/heads/tswast-patch-1: 77a9dd163b79322d6166136bdf97bbebd24b8fea
6161refs/heads/pubsub-streaming-pull: 19262b752ee874eb2ca3b950eb2aef44d5a5267b
Original file line number Diff line number Diff 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 /**
Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments