Skip to content

Commit 2ada91b

Browse files
cpovirkwmdietl
andauthored
Annotate ClassValue. (#119)
Co-authored-by: Werner Dietl <[email protected]>
1 parent 5906edc commit 2ada91b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/java.base/share/classes/java/lang/ClassValue.java

+5-1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@
3131

3232
import jdk.internal.misc.Unsafe;
3333

34+
import org.jspecify.annotations.NullMarked;
35+
import org.jspecify.annotations.Nullable;
36+
3437
import static java.lang.ClassValue.ClassValueMap.probeHomeLocation;
3538
import static java.lang.ClassValue.ClassValueMap.probeBackupLocations;
3639

@@ -44,7 +47,8 @@
4447
* @author John Rose, JSR 292 EG
4548
* @since 1.7
4649
*/
47-
public abstract class ClassValue<T> {
50+
@NullMarked
51+
public abstract class ClassValue<T extends @Nullable Object> {
4852
/**
4953
* Sole constructor. (For invocation by subclass constructors, typically
5054
* implicit.)

0 commit comments

Comments
 (0)