Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't use throws clause for RuntimeExceptions, javadoc comment only


/**
* Submits a {@link Callable} to execution, returns a {@link CompletableFuture}.
Expand Down Expand Up @@ -176,6 +178,7 @@ public void submit(Runnable runnable) {
}
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
throw new RejectedExecutionException(e);
}
}

Expand Down
Loading