aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/tools/android/java/com/google/devtools/build/android/FailedFutureAggregator.java
diff options
context:
space:
mode:
authorGravatar corysmith <corysmith@google.com>2017-05-23 17:19:14 +0200
committerGravatar Irina Iancu <elenairina@google.com>2017-05-23 17:41:32 +0200
commitf6c4d6d66118410b1139a84fe34ba8134661bfa2 (patch)
tree67ee24a40c88bea1a38807155806fb957a852b9a /src/tools/android/java/com/google/devtools/build/android/FailedFutureAggregator.java
parent81316798806b274d84c4eb1131bab8c90b0c7ba1 (diff)
Add a new action for generating reconciled R classes for Robolectric.
This includes some refactoring: * Move the symbol deserialization our of the merger and into the ParsedAndroidData (probably move again.) * Change the FailedFutureAggregator generics to work more callables RELNOTES: None PiperOrigin-RevId: 156863698
Diffstat (limited to 'src/tools/android/java/com/google/devtools/build/android/FailedFutureAggregator.java')
-rw-r--r--src/tools/android/java/com/google/devtools/build/android/FailedFutureAggregator.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/tools/android/java/com/google/devtools/build/android/FailedFutureAggregator.java b/src/tools/android/java/com/google/devtools/build/android/FailedFutureAggregator.java
index da61920803..06f49036e2 100644
--- a/src/tools/android/java/com/google/devtools/build/android/FailedFutureAggregator.java
+++ b/src/tools/android/java/com/google/devtools/build/android/FailedFutureAggregator.java
@@ -56,11 +56,12 @@ class FailedFutureAggregator<T extends Throwable> {
this.exceptionFactory = exceptionFactory;
}
- /** Iterates throw a list of futures, throwing an Exception if any have failed. */
- public void aggregateAndMaybeThrow(List<ListenableFuture<Boolean>> tasks) throws T {
+ /** Iterates a list of futures, throwing an Exception if any have failed. */
+ public <V> void aggregateAndMaybeThrow(List<? extends ListenableFuture<? extends V>> tasks)
+ throws T {
// Retrieve all the exceptions and wrap them in an IOException.
T exception = null;
- for (ListenableFuture<Boolean> task : tasks) {
+ for (ListenableFuture<?> task : tasks) {
try {
task.get();
} catch (ExecutionException | InterruptedException e) {