Skip to content

Commit 9056e42

Browse files
authored
add jspecify NonNull annotation to NotNullAnnots list (#24487)
This pull request adds the [JSpecify](https://jspecify.dev/) annotation to the list of NotNull annotations for explicit nulls. JSpecify is a standard initiative [led by Google](https://jspecify.dev/about/#what-is-our-governance) that offers a unified and vendor-neutral way to [increase interoperability](https://jspecify.dev/docs/start-here/#what-is-this) with Java tooling and the growing ecosystem of static nullness checkers (e.g., tools in IntelliJ, Error Prone, NullAway).
2 parents cad0d2a + 9da102b commit 9056e42

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

compiler/src/dotty/tools/dotc/core/Definitions.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1152,7 +1152,8 @@ class Definitions {
11521152
"lombok.NonNull" ::
11531153
"reactor.util.annotation.NonNull" ::
11541154
"reactor.util.annotation.NonNullApi" ::
1155-
"io.reactivex.annotations.NonNull" :: Nil)
1155+
"io.reactivex.annotations.NonNull" ::
1156+
"org.jspecify.annotations.NonNull" :: Nil)
11561157

11571158
// convenient one-parameter method types
11581159
def methOfAny(tp: Type): MethodType = MethodType(List(AnyType), tp)

0 commit comments

Comments
 (0)