Skip to content

Commit f18a85e

Browse files
committed
Polish null-safety documentation
1 parent f7d1957 commit f18a85e

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

framework-docs/modules/ROOT/pages/core/null-safety.adoc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ declare nullability of APIs and fields:
88
* {api-spring-framework}/lang/Nullable.html[`@Nullable`]: Annotation to indicate that a
99
specific parameter, return value, or field can be `null`.
1010
* {api-spring-framework}/lang/NonNull.html[`@NonNull`]: Annotation to indicate that a specific
11-
parameter, return value, or field cannot be `null` (not needed on parameters / return values
11+
parameter, return value, or field cannot be `null` (not needed on parameters, return values,
1212
and fields where `@NonNullApi` and `@NonNullFields` apply, respectively).
1313
* {api-spring-framework}/lang/NonNullApi.html[`@NonNullApi`]: Annotation at the package level
1414
that declares non-null as the default semantics for parameters and return values.
@@ -17,7 +17,7 @@ level that declares non-null as the default semantics for fields.
1717

1818
The Spring Framework itself leverages these annotations, but they can also be used in any
1919
Spring-based Java project to declare null-safe APIs and optionally null-safe fields.
20-
Generic type arguments, varargs and array elements nullability are not supported yet.
20+
Nullability declarations for generic type arguments, varargs, and array elements are not supported yet.
2121
Nullability declarations are expected to be fine-tuned between Spring Framework releases,
2222
including minor ones. Nullability of types used inside method bodies is outside the
2323
scope of this feature.
@@ -36,7 +36,7 @@ In addition to providing an explicit declaration for Spring Framework API nullab
3636
these annotations can be used by an IDE (such as IDEA or Eclipse) to provide useful
3737
warnings related to null-safety in order to avoid `NullPointerException` at runtime.
3838

39-
They are also used to make Spring API null-safe in Kotlin projects, since Kotlin natively
39+
They are also used to make Spring APIs null-safe in Kotlin projects, since Kotlin natively
4040
supports https://kotlinlang.org/docs/null-safety.html[null-safety]. More details
4141
are available in the xref:languages/kotlin/null-safety.adoc[Kotlin support documentation].
4242

@@ -47,11 +47,11 @@ are available in the xref:languages/kotlin/null-safety.adoc[Kotlin support docum
4747
== JSR-305 meta-annotations
4848

4949
Spring annotations are meta-annotated with https://jcp.org/en/jsr/detail?id=305[JSR 305]
50-
annotations (a dormant but wide-spread JSR). JSR-305 meta-annotations let tooling vendors
50+
annotations (a dormant but widespread JSR). JSR-305 meta-annotations let tooling vendors
5151
like IDEA or Kotlin provide null-safety support in a generic way, without having to
5252
hard-code support for Spring annotations.
5353

54-
It is not necessary nor recommended to add a JSR-305 dependency to the project classpath to
55-
take advantage of Spring null-safe API. Only projects such as Spring-based libraries that use
54+
It is neither necessary nor recommended to add a JSR-305 dependency to the project classpath to
55+
take advantage of Spring's null-safe APIs. Only projects such as Spring-based libraries that use
5656
null-safety annotations in their codebase should add `com.google.code.findbugs:jsr305:3.0.2`
57-
with `compileOnly` Gradle configuration or Maven `provided` scope to avoid compile warnings.
57+
with `compileOnly` Gradle configuration or Maven `provided` scope to avoid compiler warnings.

0 commit comments

Comments
 (0)