Skip to content

Commit 467a484

Browse files
committed
Polishing
See gh-35460
1 parent 83efe8c commit 467a484

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

spring-core/src/main/java/org/springframework/core/task/SyncTaskExecutor.java

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@
2222

2323
/**
2424
* {@link TaskExecutor} implementation that executes each task <i>synchronously</i>
25-
* in the calling thread.
26-
*
27-
* <p>Mainly intended for testing scenarios.
25+
* in the calling thread. Mainly intended for testing scenarios.
2826
*
2927
* <p>Execution in the calling thread does have the advantage of participating
3028
* in its thread context, for example the thread context class loader or the
@@ -40,13 +38,13 @@
4038
public class SyncTaskExecutor implements TaskExecutor, Serializable {
4139

4240
/**
43-
* Executes the given {@code task} synchronously, through direct
44-
* invocation of it's {@link Runnable#run() run()} method.
45-
* @throws IllegalArgumentException if the given {@code task} is {@code null}
41+
* Execute the given {@code task} synchronously, through direct
42+
* invocation of its {@link Runnable#run() run()} method.
43+
* @throws RuntimeException if propagated from the given {@code Runnable}
4644
*/
4745
@Override
4846
public void execute(Runnable task) {
49-
Assert.notNull(task, "Runnable must not be null");
47+
Assert.notNull(task, "Task must not be null");
5048
task.run();
5149
}
5250

0 commit comments

Comments
 (0)