diff options
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.java | 7 |
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) { |