Skip to content

Commit fb62915

Browse files
committed
Use @Nullable Void in TaskCallback#from
Currently blocked by a potential NullAway issue.
1 parent 2c96f18 commit fb62915

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

spring-core/src/main/java/org/springframework/core/retry/support/RetryTask.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ public static Runnable wrap(Runnable task, RetryPolicy retryPolicy) {
197197
* but declaring the {@link RetryOperations} interface for flexibility)
198198
*/
199199
public static Runnable wrap(Runnable task, RetryOperations retryTemplate) {
200-
RetryTask<Void, RuntimeException> rt = new RetryTask<>(TaskCallback.from(task), retryTemplate) {
200+
RetryTask<@Nullable Void, RuntimeException> rt = new RetryTask<>(TaskCallback.from(task), retryTemplate) {
201201
@Override
202202
public String getName() {
203203
return task.getClass().getName();

spring-core/src/main/java/org/springframework/core/task/TaskCallback.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,7 @@ static <V> TaskCallback<V, Exception> from(Callable<V> task) {
5454
* Derive a {@link TaskCallback} from the given {@link Runnable}.
5555
* @since 7.0.4
5656
*/
57-
@SuppressWarnings("NullAway")
58-
static TaskCallback<Void, RuntimeException> from(Runnable task) {
57+
static TaskCallback<@Nullable Void, RuntimeException> from(Runnable task) {
5958
return () -> {
6059
task.run();
6160
return null;

0 commit comments

Comments
 (0)