Skip to content

Commit 7bd9780

Browse files
committed
Merge pull request #37436 from izeye
* pr/37436: Polish SimpleAsyncTaskExecutorBuilder Closes gh-37436
2 parents 6094212 + 9cb89e3 commit 7bd9780

File tree

1 file changed

+17
-21
lines changed

1 file changed

+17
-21
lines changed

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/task/SimpleAsyncTaskExecutorBuilder.java

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,7 @@ public class SimpleAsyncTaskExecutorBuilder {
5555
private final Set<SimpleAsyncTaskExecutorCustomizer> customizers;
5656

5757
public SimpleAsyncTaskExecutorBuilder() {
58-
this.virtualThreads = null;
59-
this.threadNamePrefix = null;
60-
this.concurrencyLimit = null;
61-
this.taskDecorator = null;
62-
this.customizers = null;
58+
this(null, null, null, null, null);
6359
}
6460

6561
private SimpleAsyncTaskExecutorBuilder(Boolean virtualThreads, String threadNamePrefix, Integer concurrencyLimit,
@@ -112,10 +108,10 @@ public SimpleAsyncTaskExecutorBuilder taskDecorator(TaskDecorator taskDecorator)
112108
}
113109

114110
/**
115-
* Set the {@link SimpleAsyncTaskExecutorCustomizer TaskExecutorCustomizers} that
116-
* should be applied to the {@link SimpleAsyncTaskExecutor}. Customizers are applied
117-
* in the order that they were added after builder configuration has been applied.
118-
* Setting this value will replace any previously configured customizers.
111+
* Set the {@link SimpleAsyncTaskExecutorCustomizer customizers} that should be
112+
* applied to the {@link SimpleAsyncTaskExecutor}. Customizers are applied in the
113+
* order that they were added after builder configuration has been applied. Setting
114+
* this value will replace any previously configured customizers.
119115
* @param customizers the customizers to set
120116
* @return a new builder instance
121117
* @see #additionalCustomizers(SimpleAsyncTaskExecutorCustomizer...)
@@ -126,13 +122,13 @@ public SimpleAsyncTaskExecutorBuilder customizers(SimpleAsyncTaskExecutorCustomi
126122
}
127123

128124
/**
129-
* Set the {@link SimpleAsyncTaskExecutorCustomizer TaskExecutorCustomizers} that
130-
* should be applied to the {@link SimpleAsyncTaskExecutor}. Customizers are applied
131-
* in the order that they were added after builder configuration has been applied.
132-
* Setting this value will replace any previously configured customizers.
125+
* Set the {@link SimpleAsyncTaskExecutorCustomizer customizers} that should be
126+
* applied to the {@link SimpleAsyncTaskExecutor}. Customizers are applied in the
127+
* order that they were added after builder configuration has been applied. Setting
128+
* this value will replace any previously configured customizers.
133129
* @param customizers the customizers to set
134130
* @return a new builder instance
135-
* @see #additionalCustomizers(SimpleAsyncTaskExecutorCustomizer...)
131+
* @see #additionalCustomizers(Iterable)
136132
*/
137133
public SimpleAsyncTaskExecutorBuilder customizers(
138134
Iterable<? extends SimpleAsyncTaskExecutorCustomizer> customizers) {
@@ -142,9 +138,9 @@ public SimpleAsyncTaskExecutorBuilder customizers(
142138
}
143139

144140
/**
145-
* Add {@link SimpleAsyncTaskExecutorCustomizer TaskExecutorCustomizers} that should
146-
* be applied to the {@link SimpleAsyncTaskExecutor}. Customizers are applied in the
147-
* order that they were added after builder configuration has been applied.
141+
* Add {@link SimpleAsyncTaskExecutorCustomizer customizers} that should be applied to
142+
* the {@link SimpleAsyncTaskExecutor}. Customizers are applied in the order that they
143+
* were added after builder configuration has been applied.
148144
* @param customizers the customizers to add
149145
* @return a new builder instance
150146
* @see #customizers(SimpleAsyncTaskExecutorCustomizer...)
@@ -155,12 +151,12 @@ public SimpleAsyncTaskExecutorBuilder additionalCustomizers(SimpleAsyncTaskExecu
155151
}
156152

157153
/**
158-
* Add {@link SimpleAsyncTaskExecutorCustomizer TaskExecutorCustomizers} that should
159-
* be applied to the {@link SimpleAsyncTaskExecutor}. Customizers are applied in the
160-
* order that they were added after builder configuration has been applied.
154+
* Add {@link SimpleAsyncTaskExecutorCustomizer customizers} that should be applied to
155+
* the {@link SimpleAsyncTaskExecutor}. Customizers are applied in the order that they
156+
* were added after builder configuration has been applied.
161157
* @param customizers the customizers to add
162158
* @return a new builder instance
163-
* @see #customizers(SimpleAsyncTaskExecutorCustomizer...)
159+
* @see #customizers(Iterable)
164160
*/
165161
public SimpleAsyncTaskExecutorBuilder additionalCustomizers(
166162
Iterable<? extends SimpleAsyncTaskExecutorCustomizer> customizers) {

0 commit comments

Comments
 (0)