Skip to content
This repository has been archived by the owner on Sep 27, 2023. It is now read-only.

feat: add ApiFutures.successfulAsList #163

Merged
merged 1 commit into from Jul 17, 2020
Merged

feat: add ApiFutures.successfulAsList #163

merged 1 commit into from Jul 17, 2020

Conversation

thebrianchen
Copy link

I would like to use this in the java-firestore repo. This PR exposes ApiFutures.successfulAsList (link).

Here is a PR that uses it (link). successfulAsList allows me to wait for all Futures to complete (ApiFutures.allAsList completes early if an exception is thrown) before I run my listener. The alternative implementation without this method would be to manually add listeners to all the ApiFutures in order to handle exceptions.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jul 14, 2020
@codecov
Copy link

codecov bot commented Jul 14, 2020

Codecov Report

Merging #163 into master will increase coverage by 0.24%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #163      +/-   ##
============================================
+ Coverage     64.43%   64.68%   +0.24%     
- Complexity      174      175       +1     
============================================
  Files            14       14              
  Lines           717      722       +5     
  Branches        120      120              
============================================
+ Hits            462      467       +5     
  Misses          219      219              
  Partials         36       36              
Impacted Files Coverage Δ Complexity Δ
src/main/java/com/google/api/core/ApiFutures.java 87.03% <100.00%> (+1.32%) 12.00 <1.00> (+1.00)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8fad49d...43b931b. Read the comment docs.

@thebrianchen thebrianchen marked this pull request as ready for review July 14, 2020 21:32
@BenWhitehead BenWhitehead self-requested a review July 14, 2020 21:54
Copy link

@BenWhitehead BenWhitehead left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks okay to me. @chingor13 does this seem okay to you?

Copy link
Contributor

@vam-google vam-google left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@BenWhitehead BenWhitehead merged commit 6af8e24 into googleapis:master Jul 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
4 participants