Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
package java.util.concurrent.locks;

import java.util.concurrent.TimeUnit;
import org.jspecify.annotations.NullMarked;

/**
* {@code Lock} implementations provide more extensive locking
Expand Down Expand Up @@ -166,6 +167,7 @@
* @since 1.5
* @author Doug Lea
*/
@NullMarked
public interface Lock {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
import java.util.Collection;
import java.util.concurrent.TimeUnit;
import jdk.internal.vm.annotation.ReservedStackAccess;
import org.jspecify.annotations.NullMarked;
import org.jspecify.annotations.Nullable;

/**
* A reentrant mutual exclusion {@link Lock} with the same basic
Expand Down Expand Up @@ -106,6 +108,7 @@
* @since 1.5
* @author Doug Lea
*/
@NullMarked
public class ReentrantLock implements Lock, java.io.Serializable {
private static final long serialVersionUID = 7373984872572414699L;
/** @serial Synchronizer providing all implementation mechanics */
Expand Down Expand Up @@ -650,7 +653,7 @@ public final boolean isFair() {
*
* @return the owner, or {@code null} if not owned
*/
protected Thread getOwner() {
protected @Nullable Thread getOwner() {
return sync.getOwner();
}

Expand Down
Loading