diff options
author | 2017-05-23 17:19:14 +0200 | |
---|---|---|
committer | 2017-05-23 17:41:32 +0200 | |
commit | f6c4d6d66118410b1139a84fe34ba8134661bfa2 (patch) | |
tree | 67ee24a40c88bea1a38807155806fb957a852b9a /src/tools/android/java/com/google/devtools/build/android/FailedFutureAggregator.java | |
parent | 81316798806b274d84c4eb1131bab8c90b0c7ba1 (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.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) { |