Skip to content

Commit

Permalink
Fix ApiFutures.addCallback() (#3886)
Browse files Browse the repository at this point in the history
ApiFutures.addCallback() now requires a third argument (a non-direct executor). 

Ref: https://github.com/googleapis/api-common-java/blob/master/src/main/java/com/google/api/core/ApiFutures.java
  • Loading branch information
anguillanneuf authored and pongad committed Nov 5, 2018
1 parent 9c111f4 commit 7d50799
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import com.google.pubsub.v1.ProjectTopicName;
import com.google.pubsub.v1.PubsubMessage;
import java.io.FileInputStream;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
import org.threeten.bp.Duration;

Expand All @@ -62,7 +63,7 @@ public void onSuccess(String messageId) {
public void onFailure(Throwable t) {
System.out.println("failed to publish: " + t);
}
});
}, Executors.newSingleThreadExecutor());
return messageIdFuture;
}

Expand Down

0 comments on commit 7d50799

Please sign in to comment.