From 19f054306323a50b752f9de3ccf14610bcfaa2c0 Mon Sep 17 00:00:00 2001 From: opencode Date: Thu, 23 Jul 2026 22:34:44 +0000 Subject: [PATCH 1/2] Fix InterruptedException silently dropping task in SmartExecutor.Limited.submit(Runnable) Fixes #1993 --- .../java/org/eclipse/aether/util/concurrency/SmartExecutor.java | 1 + 1 file changed, 1 insertion(+) 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..20910472d1 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 @@ -176,6 +176,7 @@ public void submit(Runnable runnable) { } } catch (InterruptedException e) { Thread.currentThread().interrupt(); + throw new RuntimeException(e); } } From 30255b5336e2f8841539fb051e0a5712794b188b Mon Sep 17 00:00:00 2001 From: opencode Date: Thu, 23 Jul 2026 22:42:51 +0000 Subject: [PATCH 2/2] Address review: use RejectedExecutionException, document throws clause --- .../org/eclipse/aether/util/concurrency/SmartExecutor.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 20910472d1..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,7 +178,7 @@ public void submit(Runnable runnable) { } } catch (InterruptedException e) { Thread.currentThread().interrupt(); - throw new RuntimeException(e); + throw new RejectedExecutionException(e); } }