Skip to content

Commit 44849f3

Browse files
author
chenyumic
authored
Minor Fix
1 parent f1ac84a commit 44849f3

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

google-cloud-examples/src/main/java/com/google/cloud/examples/pubsub/snippets/CreateTopicAndPublishMessages.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public static void publishMessagesWithErrorHandler() throws Exception {
9797
ApiFuture<String> future = publisher.publish(pubsubMessage);
9898

9999
// Add an asynchronous callback to handle success / failure
100-
ApiFuture.addCallback(future, newApiFutureCallback<String>()) {
100+
ApiFuture.addCallback(future, new ApiFutureCallback<String>() {
101101

102102
@Override
103103
public void onFailure(Throwable throwable) {
@@ -115,7 +115,7 @@ public void onSuccess(String messageId) {
115115
// Once published, returns server-assigned message ids (unique within the topic)
116116
System.out.println(messageId);
117117
}
118-
}
118+
});
119119
}
120120
} finally {
121121
if (publisher != null) {

0 commit comments

Comments
 (0)