From bccdf043584040e70f5db227c28e2f789f0bef10 Mon Sep 17 00:00:00 2001 From: Tadaya Tsuyukubo Date: Mon, 23 Sep 2019 21:21:31 -0700 Subject: [PATCH] Use ordered TaskExecutorCustomizers Use an ordered stream in `TaskExecutionAutoConfiguration` when obtaining the TaskExecutor customizers. See gh-18333 --- .../boot/autoconfigure/task/TaskExecutionAutoConfiguration.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/task/TaskExecutionAutoConfiguration.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/task/TaskExecutionAutoConfiguration.java index d6e4cb842bc1..0cb0a8797267 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/task/TaskExecutionAutoConfiguration.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/task/TaskExecutionAutoConfiguration.java @@ -75,7 +75,7 @@ public TaskExecutorBuilder taskExecutorBuilder() { builder = builder.allowCoreThreadTimeOut(pool.isAllowCoreThreadTimeout()); builder = builder.keepAlive(pool.getKeepAlive()); builder = builder.threadNamePrefix(this.properties.getThreadNamePrefix()); - builder = builder.customizers(this.taskExecutorCustomizers); + builder = builder.customizers(this.taskExecutorCustomizers.orderedStream()::iterator); builder = builder.taskDecorator(this.taskDecorator.getIfUnique()); return builder; }