From fd6e15bb4d8d0c375eb91951d0b70dc62c5664cf Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Sun, 21 Dec 2025 21:44:10 +0100 Subject: [PATCH] Align execute(TaskCallback) declaration with return value nullability See gh-36057 --- .../java/org/springframework/core/task/SyncTaskExecutor.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spring-core/src/main/java/org/springframework/core/task/SyncTaskExecutor.java b/spring-core/src/main/java/org/springframework/core/task/SyncTaskExecutor.java index df34deeaad1..5b6e633da09 100644 --- a/spring-core/src/main/java/org/springframework/core/task/SyncTaskExecutor.java +++ b/spring-core/src/main/java/org/springframework/core/task/SyncTaskExecutor.java @@ -18,6 +18,8 @@ package org.springframework.core.task; import java.io.Serializable; +import org.jspecify.annotations.Nullable; + import org.springframework.util.Assert; import org.springframework.util.ConcurrencyThrottleSupport; @@ -70,7 +72,7 @@ public class SyncTaskExecutor extends ConcurrencyThrottleSupport implements Task * @throws E if propagated from the given {@code TaskCallback} * @since 7.0 */ - public V execute(TaskCallback task) throws E { + public V execute(TaskCallback task) throws E { Assert.notNull(task, "Task must not be null"); if (isThrottleActive()) { beforeAccess();