File tree Expand file tree Collapse file tree
main/java/com/example/storage
test/java/com/example/storage Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2626public 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]
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments