File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed
Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -164,8 +164,7 @@ import com.google.gcloud.storage.StorageOptions;
164164import java.nio.ByteBuffer;
165165import java.nio.channels.WritableByteChannel;
166166
167- StorageOptions options = StorageOptions.builder().projectId("project").build ();
168- Storage storage = options.service ();
167+ Storage storage = StorageOptions.defaultInstance().service ();
169168BlobId blobId = BlobId.of(" bucket" , " blob_name" );
170169Blob blob = Blob.load(storage, blobId);
171170if (blob == null) {
Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ import com.google.gcloud.storage.StorageOptions;
6868import java.nio.ByteBuffer ;
6969import java.nio.channels.WritableByteChannel ;
7070
71- Storage storage = StorageOptions . getDefaultInstance (). service();
71+ Storage storage = StorageOptions . defaultInstance (). service();
7272Blob blob = new Blob (storage, " bucket" , " blob_name" );
7373if (! blob. exists()) {
7474 storage2. create(blob. info(), " Hello, Cloud Storage!" . getBytes(UTF_8 ));
You can’t perform that action at this time.
0 commit comments