Skip to content

Commit 977ad19

Browse files
cpovirkkoshachy
andauthored
chore: mention JSpecify in the Java-Kotlin nullability guide (#5082)
* Mention JSpecify in the Java-Kotlin nullability guide. It's already mentioned in https://kotlinlang.org/docs/java-interop.html#nullability-annotations, just not here. * Update java-to-kotlin-nullability-guide.md wording * Update java-to-kotlin-nullability-guide.md wording 2 --------- Co-authored-by: Andrey Polyakov <[email protected]>
1 parent ab27aac commit 977ad19

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/topics/jvm/java-to-kotlin-nullability-guide.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ fun stringLength(a: String?): Int = a?.length ?: 0
103103

104104
In Java, you can use annotations showing whether a variable can or cannot be `null`.
105105
Such annotations aren't part of the standard library, but you can add them separately.
106-
For example, you can use the JetBrains annotations `@Nullable` and `@NotNull` (from the `org.jetbrains.annotations` package)
107-
or annotations from Eclipse (`org.eclipse.jdt.annotation`).
106+
For example, you can use JetBrains annotations `@Nullable` and `@NotNull` (from the `org.jetbrains.annotations` package),
107+
annotations from [JSpecify](https://jspecify.dev/) (`org.jspecify.annotations`), or from Eclipse (`org.eclipse.jdt.annotation`).
108108
Kotlin can recognize such annotations when you're [calling Java code from Kotlin code](java-interop.md#nullability-annotations)
109109
and will treat types according to their annotations.
110110

0 commit comments

Comments
 (0)