diff --git a/README.md b/README.md index bba06a7e60d4..03bf2e69f915 100644 --- a/README.md +++ b/README.md @@ -164,8 +164,7 @@ import com.google.gcloud.storage.StorageOptions; import java.nio.ByteBuffer; import java.nio.channels.WritableByteChannel; -StorageOptions options = StorageOptions.builder().projectId("project").build(); -Storage storage = options.service(); +Storage storage = StorageOptions.defaultInstance().service(); BlobId blobId = BlobId.of("bucket", "blob_name"); Blob blob = Blob.load(storage, blobId); if (blob == null) { diff --git a/gcloud-java-storage/README.md b/gcloud-java-storage/README.md index 8b19484dd14d..0302439a4314 100644 --- a/gcloud-java-storage/README.md +++ b/gcloud-java-storage/README.md @@ -68,7 +68,7 @@ import com.google.gcloud.storage.StorageOptions; import java.nio.ByteBuffer; import java.nio.channels.WritableByteChannel; -Storage storage = StorageOptions.getDefaultInstance().service(); +Storage storage = StorageOptions.defaultInstance().service(); Blob blob = new Blob(storage, "bucket", "blob_name"); if (!blob.exists()) { storage2.create(blob.info(), "Hello, Cloud Storage!".getBytes(UTF_8));