Skip to content

Commit 09b7842

Browse files
authoredMar 31, 2022
docs: Update CreateBucketPubSubNotification to have line without horizontal scrolling (#1335)
If you write sample code, please follow the [samples format]( https://github.com/GoogleCloudPlatform/java-docs-samples/blob/main/SAMPLE_FORMAT.md).
1 parent fa9920d commit 09b7842

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎samples/snippets/src/main/java/com/example/storage/bucket/CreateBucketPubSubNotification.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ public static void createBucketPubSubNotification(
5858
.setPayloadFormat(payloadFormat)
5959
.build();
6060
Notification notification = storage.createNotification(bucketName, notificationInfo);
61-
System.out.println("Successfully created notification for topic " + notification.getTopic());
61+
String topic = notification.getTopic();
62+
System.out.println("Successfully created notification for topic " + topic);
6263
}
6364
}
6465
// [END storage_create_bucket_notifications]

0 commit comments

Comments
 (0)
Please sign in to comment.