Skip to content

Commit 9152173

Browse files
jerjoufrankyn
authored andcommitted
deprecated methods -> undeprecated versions. (#428)
1 parent 8f9acc3 commit 9152173

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

samples/snippets/src/main/java/com/example/storage/QuickstartSample.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@
2626
public class QuickstartSample {
2727
public static void main(String... args) throws Exception {
2828
// Instantiates a client
29-
Storage storage = StorageOptions.defaultInstance().service();
29+
Storage storage = StorageOptions.getDefaultInstance().getService();
3030

3131
// The name for the new bucket
3232
String bucketName = args[0]; // "my-new-bucket";
3333

3434
// Creates the new bucket
3535
Bucket bucket = storage.create(BucketInfo.of(bucketName));
3636

37-
System.out.printf("Bucket %s created.%n", bucket.name());
37+
System.out.printf("Bucket %s created.%n", bucket.getName());
3838
}
3939
}
4040
// [END storage_quickstart]

samples/snippets/src/test/java/com/example/storage/QuickstartSampleIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public class QuickstartSampleIT {
4141
private PrintStream out;
4242

4343
private static final void deleteBucket(String bucketName) {
44-
Storage storage = StorageOptions.defaultInstance().service();
44+
Storage storage = StorageOptions.getDefaultInstance().getService();
4545
storage.delete(bucketName);
4646
}
4747

0 commit comments

Comments
 (0)