File tree 2 files changed +2
-3
lines changed
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;
164
164
import java.nio.ByteBuffer;
165
165
import java.nio.channels.WritableByteChannel;
166
166
167
- StorageOptions options = StorageOptions.builder().projectId("project").build ();
168
- Storage storage = options.service ();
167
+ Storage storage = StorageOptions.defaultInstance().service ();
169
168
BlobId blobId = BlobId.of(" bucket" , " blob_name" );
170
169
Blob blob = Blob.load(storage, blobId);
171
170
if (blob == null) {
Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ import com.google.gcloud.storage.StorageOptions;
68
68
import java.nio.ByteBuffer ;
69
69
import java.nio.channels.WritableByteChannel ;
70
70
71
- Storage storage = StorageOptions . getDefaultInstance (). service();
71
+ Storage storage = StorageOptions . defaultInstance (). service();
72
72
Blob blob = new Blob (storage, " bucket" , " blob_name" );
73
73
if (! blob. exists()) {
74
74
storage2. create(blob. info(), " Hello, Cloud Storage!" . getBytes(UTF_8 ));
You can’t perform that action at this time.
0 commit comments