Skip to content

Commit 101048e

Browse files
committed
Merge pull request #389 from aozarov/temp
fix readmes for storage
2 parents 4ecd840 + 93da8a9 commit 101048e

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,7 @@ import com.google.gcloud.storage.StorageOptions;
164164
import java.nio.ByteBuffer;
165165
import java.nio.channels.WritableByteChannel;
166166
167-
StorageOptions options = StorageOptions.builder().projectId("project").build();
168-
Storage storage = options.service();
167+
Storage storage = StorageOptions.defaultInstance().service();
169168
BlobId blobId = BlobId.of("bucket", "blob_name");
170169
Blob blob = Blob.load(storage, blobId);
171170
if (blob == null) {

gcloud-java-storage/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ import com.google.gcloud.storage.StorageOptions;
6868
import java.nio.ByteBuffer;
6969
import java.nio.channels.WritableByteChannel;
7070

71-
Storage storage = StorageOptions.getDefaultInstance().service();
71+
Storage storage = StorageOptions.defaultInstance().service();
7272
Blob blob = new Blob(storage, "bucket", "blob_name");
7373
if (!blob.exists()) {
7474
storage2.create(blob.info(), "Hello, Cloud Storage!".getBytes(UTF_8));

0 commit comments

Comments
 (0)