|
|
|
|
@ -18,6 +18,8 @@ package org.springframework.core.task;
@@ -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
@@ -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, E extends Exception> V execute(TaskCallback<V, E> task) throws E { |
|
|
|
|
public <V extends @Nullable Object, E extends Exception> V execute(TaskCallback<V, E> task) throws E { |
|
|
|
|
Assert.notNull(task, "Task must not be null"); |
|
|
|
|
if (isThrottleActive()) { |
|
|
|
|
beforeAccess(); |
|
|
|
|
|