diff --git a/sshd-common/src/main/java/org/apache/sshd/common/util/threads/CloseableExecutorService.java b/sshd-common/src/main/java/org/apache/sshd/common/util/threads/CloseableExecutorService.java index cc7a81b96..3f4bf77dd 100644 --- a/sshd-common/src/main/java/org/apache/sshd/common/util/threads/CloseableExecutorService.java +++ b/sshd-common/src/main/java/org/apache/sshd/common/util/threads/CloseableExecutorService.java @@ -20,6 +20,7 @@ package org.apache.sshd.common.util.threads; import java.io.IOException; +import java.io.UncheckedIOException; import java.time.Duration; import java.util.Objects; import java.util.concurrent.ExecutorService; @@ -34,7 +35,11 @@ default boolean awaitTermination(Duration timeout) throws InterruptedException { } @Override - default void close() throws IOException { - Closeable.super.close(); + default void close() { + try { + Closeable.super.close(); + } catch (IOException e) { + throw new UncheckedIOException(e); + } } }