diff --git a/maven-resolver-util/src/main/java/org/eclipse/aether/util/concurrency/SmartExecutor.java b/maven-resolver-util/src/main/java/org/eclipse/aether/util/concurrency/SmartExecutor.java index 3b2f25c1f3..9755a9fc71 100644 --- a/maven-resolver-util/src/main/java/org/eclipse/aether/util/concurrency/SmartExecutor.java +++ b/maven-resolver-util/src/main/java/org/eclipse/aether/util/concurrency/SmartExecutor.java @@ -35,8 +35,10 @@ public interface SmartExecutor extends AutoCloseable { /** * Submits a {@link Runnable} to execution. + * + * @throws RejectedExecutionException If this executor cannot accept the task. */ - void submit(Runnable runnable); + void submit(Runnable runnable) throws RejectedExecutionException; /** * Submits a {@link Callable} to execution, returns a {@link CompletableFuture}. @@ -176,6 +178,7 @@ public void submit(Runnable runnable) { } } catch (InterruptedException e) { Thread.currentThread().interrupt(); + throw new RejectedExecutionException(e); } }