Skip to content

Commit 834e903

Browse files
committed
Annotate nullability in org.junit.platform.commons.test
1 parent 1943846 commit 834e903

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

junit-platform-commons/src/testFixtures/java/org/junit/platform/commons/test/ConcurrencyTestingUtils.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
import java.util.concurrent.ExecutorService;
2222
import java.util.concurrent.Executors;
2323

24+
import org.jspecify.annotations.Nullable;
25+
2426
public class ConcurrencyTestingUtils {
2527

2628
public static void executeConcurrently(int threads, Runnable action) throws Exception {
@@ -30,7 +32,7 @@ public static void executeConcurrently(int threads, Runnable action) throws Exce
3032
});
3133
}
3234

33-
public static <T> List<T> executeConcurrently(int threads, Callable<T> action) throws Exception {
35+
public static <T> List<T> executeConcurrently(int threads, Callable<@Nullable T> action) throws Exception {
3436
ExecutorService executorService = Executors.newFixedThreadPool(threads);
3537
try {
3638
CountDownLatch latch = new CountDownLatch(threads);
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
2+
@NullMarked
3+
package org.junit.platform.commons.test;
4+
5+
import org.jspecify.annotations.NullMarked;

0 commit comments

Comments
 (0)