11/*
2- * Copyright 2012-2023 the original author or authors.
2+ * Copyright 2012-2024 the original author or authors.
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License");
55 * you may not use this file except in compliance with the License.
@@ -47,16 +47,16 @@ public class SimpleAsyncTaskSchedulerBuilder {
4747
4848 private final Boolean virtualThreads ;
4949
50- private final Set <SimpleAsyncTaskSchedulerCustomizer > customizers ;
51-
5250 private final Duration taskTerminationTimeout ;
5351
52+ private final Set <SimpleAsyncTaskSchedulerCustomizer > customizers ;
53+
5454 public SimpleAsyncTaskSchedulerBuilder () {
5555 this (null , null , null , null , null );
5656 }
5757
5858 private SimpleAsyncTaskSchedulerBuilder (String threadNamePrefix , Integer concurrencyLimit , Boolean virtualThreads ,
59- Set <SimpleAsyncTaskSchedulerCustomizer > taskSchedulerCustomizers , Duration taskTerminationTimeout ) {
59+ Duration taskTerminationTimeout , Set <SimpleAsyncTaskSchedulerCustomizer > taskSchedulerCustomizers ) {
6060 this .threadNamePrefix = threadNamePrefix ;
6161 this .concurrencyLimit = concurrencyLimit ;
6262 this .virtualThreads = virtualThreads ;
@@ -71,7 +71,7 @@ private SimpleAsyncTaskSchedulerBuilder(String threadNamePrefix, Integer concurr
7171 */
7272 public SimpleAsyncTaskSchedulerBuilder threadNamePrefix (String threadNamePrefix ) {
7373 return new SimpleAsyncTaskSchedulerBuilder (threadNamePrefix , this .concurrencyLimit , this .virtualThreads ,
74- this .customizers , this .taskTerminationTimeout );
74+ this .taskTerminationTimeout , this .customizers );
7575 }
7676
7777 /**
@@ -81,7 +81,7 @@ public SimpleAsyncTaskSchedulerBuilder threadNamePrefix(String threadNamePrefix)
8181 */
8282 public SimpleAsyncTaskSchedulerBuilder concurrencyLimit (Integer concurrencyLimit ) {
8383 return new SimpleAsyncTaskSchedulerBuilder (this .threadNamePrefix , concurrencyLimit , this .virtualThreads ,
84- this .customizers , this .taskTerminationTimeout );
84+ this .taskTerminationTimeout , this .customizers );
8585 }
8686
8787 /**
@@ -91,7 +91,7 @@ public SimpleAsyncTaskSchedulerBuilder concurrencyLimit(Integer concurrencyLimit
9191 */
9292 public SimpleAsyncTaskSchedulerBuilder virtualThreads (Boolean virtualThreads ) {
9393 return new SimpleAsyncTaskSchedulerBuilder (this .threadNamePrefix , this .concurrencyLimit , virtualThreads ,
94- this .customizers , this .taskTerminationTimeout );
94+ this .taskTerminationTimeout , this .customizers );
9595 }
9696
9797 /**
@@ -102,7 +102,7 @@ public SimpleAsyncTaskSchedulerBuilder virtualThreads(Boolean virtualThreads) {
102102 */
103103 public SimpleAsyncTaskSchedulerBuilder taskTerminationTimeout (Duration taskTerminationTimeout ) {
104104 return new SimpleAsyncTaskSchedulerBuilder (this .threadNamePrefix , this .concurrencyLimit , this .virtualThreads ,
105- this .customizers , taskTerminationTimeout );
105+ taskTerminationTimeout , this .customizers );
106106 }
107107
108108 /**
@@ -132,7 +132,7 @@ public SimpleAsyncTaskSchedulerBuilder customizers(
132132 Iterable <? extends SimpleAsyncTaskSchedulerCustomizer > customizers ) {
133133 Assert .notNull (customizers , "Customizers must not be null" );
134134 return new SimpleAsyncTaskSchedulerBuilder (this .threadNamePrefix , this .concurrencyLimit , this .virtualThreads ,
135- append (null , customizers ), this . taskTerminationTimeout );
135+ this . taskTerminationTimeout , append (null , customizers ));
136136 }
137137
138138 /**
@@ -160,7 +160,7 @@ public SimpleAsyncTaskSchedulerBuilder additionalCustomizers(
160160 Iterable <? extends SimpleAsyncTaskSchedulerCustomizer > customizers ) {
161161 Assert .notNull (customizers , "Customizers must not be null" );
162162 return new SimpleAsyncTaskSchedulerBuilder (this .threadNamePrefix , this .concurrencyLimit , this .virtualThreads ,
163- append (this .customizers , customizers ), this . taskTerminationTimeout );
163+ this . taskTerminationTimeout , append (this .customizers , customizers ));
164164 }
165165
166166 /**
0 commit comments