From 9cb89e3366b81c97dec9c287d20933b8b99acfc2 Mon Sep 17 00:00:00 2001 From: Johnny Lim Date: Sat, 16 Sep 2023 19:01:52 +0900 Subject: [PATCH] Polish SimpleAsyncTaskExecutorBuilder See gh-37436 --- .../task/SimpleAsyncTaskExecutorBuilder.java | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/task/SimpleAsyncTaskExecutorBuilder.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/task/SimpleAsyncTaskExecutorBuilder.java index 12d71da1af..c040dc6406 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/task/SimpleAsyncTaskExecutorBuilder.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/task/SimpleAsyncTaskExecutorBuilder.java @@ -55,11 +55,7 @@ public class SimpleAsyncTaskExecutorBuilder { private final Set customizers; public SimpleAsyncTaskExecutorBuilder() { - this.virtualThreads = null; - this.threadNamePrefix = null; - this.concurrencyLimit = null; - this.taskDecorator = null; - this.customizers = null; + this(null, null, null, null, null); } private SimpleAsyncTaskExecutorBuilder(Boolean virtualThreads, String threadNamePrefix, Integer concurrencyLimit, @@ -112,7 +108,7 @@ public class SimpleAsyncTaskExecutorBuilder { } /** - * Set the {@link SimpleAsyncTaskExecutorCustomizer TaskExecutorCustomizers} that + * Set the {@link SimpleAsyncTaskExecutorCustomizer customizers} that * should be applied to the {@link SimpleAsyncTaskExecutor}. Customizers are applied * in the order that they were added after builder configuration has been applied. * Setting this value will replace any previously configured customizers. @@ -126,13 +122,13 @@ public class SimpleAsyncTaskExecutorBuilder { } /** - * Set the {@link SimpleAsyncTaskExecutorCustomizer TaskExecutorCustomizers} that + * Set the {@link SimpleAsyncTaskExecutorCustomizer customizers} that * should be applied to the {@link SimpleAsyncTaskExecutor}. Customizers are applied * in the order that they were added after builder configuration has been applied. * Setting this value will replace any previously configured customizers. * @param customizers the customizers to set * @return a new builder instance - * @see #additionalCustomizers(SimpleAsyncTaskExecutorCustomizer...) + * @see #additionalCustomizers(Iterable) */ public SimpleAsyncTaskExecutorBuilder customizers( Iterable customizers) { @@ -142,7 +138,7 @@ public class SimpleAsyncTaskExecutorBuilder { } /** - * Add {@link SimpleAsyncTaskExecutorCustomizer TaskExecutorCustomizers} that should + * Add {@link SimpleAsyncTaskExecutorCustomizer customizers} that should * be applied to the {@link SimpleAsyncTaskExecutor}. Customizers are applied in the * order that they were added after builder configuration has been applied. * @param customizers the customizers to add @@ -155,12 +151,12 @@ public class SimpleAsyncTaskExecutorBuilder { } /** - * Add {@link SimpleAsyncTaskExecutorCustomizer TaskExecutorCustomizers} that should + * Add {@link SimpleAsyncTaskExecutorCustomizer customizers} that should * be applied to the {@link SimpleAsyncTaskExecutor}. Customizers are applied in the * order that they were added after builder configuration has been applied. * @param customizers the customizers to add * @return a new builder instance - * @see #customizers(SimpleAsyncTaskExecutorCustomizer...) + * @see #customizers(Iterable) */ public SimpleAsyncTaskExecutorBuilder additionalCustomizers( Iterable customizers) {