Skip to content

Commit

Permalink
Annotate ThreadFactory.
Browse files Browse the repository at this point in the history
  • Loading branch information
cpovirk committed Jan 25, 2023
1 parent d053508 commit 24191c6
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@

package java.util.concurrent;

import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;

/**
* An object that creates new threads on demand. Using thread factories
* removes hardwiring of calls to {@link Thread#Thread(Runnable) new Thread},
Expand All @@ -55,6 +58,7 @@
* @since 1.5
* @author Doug Lea
*/
@NullMarked
public interface ThreadFactory {

/**
Expand All @@ -65,5 +69,5 @@ public interface ThreadFactory {
* @return constructed thread, or {@code null} if the request to
* create a thread is rejected
*/
Thread newThread(Runnable r);
@Nullable Thread newThread(Runnable r);
}

0 comments on commit 24191c6

Please sign in to comment.