Cleaning up generics in SequentialExecutorService by sduskis · Pull Request #4982 · googleapis/google-cloud-java · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ interface CancellableRunnable extends Runnable {
* key will be run only when its predecessor has been completed while tasks with different keys can
* be run in parallel.
*/
final class SequentialExecutorService<T> {
final class SequentialExecutorService {
private static final Logger logger = Logger.getLogger(SequentialExecutorService.class.getName());

private final CallbackExecutor callbackExecutor;
Expand All @@ -56,7 +56,7 @@ final class SequentialExecutorService<T> {
* Runs asynchronous {@code Callable} tasks sequentially. If one of the tasks fails, other tasks
* with the same key that have not been executed will be cancelled.
*/
ApiFuture<T> submit(final String key, final Callable<ApiFuture> callable) {
<T> ApiFuture<T> submit(final String key, final Callable<ApiFuture<T>> callable) {
return callbackExecutor.submit(key, callable);
}

Expand Down Expand Up @@ -146,7 +146,7 @@ private static class CallbackExecutor extends SequentialExecutor {
super(executor);
}

<T> ApiFuture<T> submit(final String key, final Callable<ApiFuture> callable) {
<T> ApiFuture<T> submit(final String key, final Callable<ApiFuture<T>> callable) {
final SettableApiFuture<T> future = SettableApiFuture.create();
execute(
key,
Expand Down