Skip to content

Commit

Permalink
apacheGH-285: Fix compilation failure on Java 19
Browse files Browse the repository at this point in the history
Follow-up to 03986c5

Bug: apache#285
  • Loading branch information
cushon committed Dec 11, 2022
1 parent 03986c5 commit e66c448
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
}
}
}

0 comments on commit e66c448

Please sign in to comment.