diff --git a/src/java.base/share/classes/java/util/concurrent/AbstractExecutorService.java b/src/java.base/share/classes/java/util/concurrent/AbstractExecutorService.java index f45c0036230..1b1ba4b29a0 100644 --- a/src/java.base/share/classes/java/util/concurrent/AbstractExecutorService.java +++ b/src/java.base/share/classes/java/util/concurrent/AbstractExecutorService.java @@ -117,6 +117,7 @@ public abstract class AbstractExecutorService implements ExecutorService { * @throws RejectedExecutionException {@inheritDoc} * @throws NullPointerException {@inheritDoc} */ + @Override public Future submit(Runnable task) { if (task == null) throw new NullPointerException(); RunnableFuture ftask = newTaskFor(task, null); @@ -128,6 +129,7 @@ public abstract class AbstractExecutorService implements ExecutorService { * @throws RejectedExecutionException {@inheritDoc} * @throws NullPointerException {@inheritDoc} */ + @Override public Future submit(Runnable task, T result) { if (task == null) throw new NullPointerException(); RunnableFuture ftask = newTaskFor(task, result); @@ -139,6 +141,7 @@ public abstract class AbstractExecutorService implements ExecutorService { * @throws RejectedExecutionException {@inheritDoc} * @throws NullPointerException {@inheritDoc} */ + @Override public Future submit(Callable task) { if (task == null) throw new NullPointerException(); RunnableFuture ftask = newTaskFor(task); @@ -219,6 +222,14 @@ public abstract class AbstractExecutorService implements ExecutorService { } } + /** + * @throws InterruptedException {@inheritDoc} + * @throws NullPointerException {@inheritDoc} + * @throws IllegalArgumentException {@inheritDoc} + * @throws ExecutionException {@inheritDoc} + * @throws RejectedExecutionException {@inheritDoc} + */ + @Override public T invokeAny(Collection> tasks) throws InterruptedException, ExecutionException { try { @@ -229,12 +240,26 @@ public abstract class AbstractExecutorService implements ExecutorService { } } + /** + * @throws InterruptedException {@inheritDoc} + * @throws NullPointerException {@inheritDoc} + * @throws TimeoutException {@inheritDoc} + * @throws ExecutionException {@inheritDoc} + * @throws RejectedExecutionException {@inheritDoc} + */ + @Override public T invokeAny(Collection> tasks, long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException { return doInvokeAny(tasks, true, unit.toNanos(timeout)); } + /** + * @throws InterruptedException {@inheritDoc} + * @throws NullPointerException {@inheritDoc} + * @throws RejectedExecutionException {@inheritDoc} + */ + @Override public List> invokeAll(Collection> tasks) throws InterruptedException { if (tasks == null) @@ -260,6 +285,12 @@ public abstract class AbstractExecutorService implements ExecutorService { } } + /** + * @throws InterruptedException {@inheritDoc} + * @throws NullPointerException {@inheritDoc} + * @throws RejectedExecutionException {@inheritDoc} + */ + @Override public List> invokeAll(Collection> tasks, long timeout, TimeUnit unit) throws InterruptedException {