Skip to content

Commit daa97f9

Browse files
committed
Document Null Safety Support in Reference Documentation
Closes gh-1662
1 parent 1a5b07c commit daa97f9

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

spring-ws-docs/src/docs/asciidoc/common.adoc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,18 @@
66
This chapter explores the components that are shared between client- and server-side Spring-WS development.
77
These interfaces and classes represent the building blocks of Spring-WS, so you need to understand what they do, even if you do not use them directly.
88

9+
[[web-service-null-safety]]
10+
== Null Safety
11+
Spring-WS is annotated with https://jspecify.dev/docs/start-here/[JSpecify] annotations to declare the nullability of its API.
12+
To learn more about JSpecify, its https://jspecify.dev/docs/user-guide/[user guide] is recommended reading.
13+
14+
The primary goal of declaring the nullability of the API is to prevent a `NullPointerException` from being thrown at runtime.
15+
This is achieved through build-time checks that are available with both Java and Kotlin.
16+
Performing the checks with Java requires some tooling such as https://github.com/uber/NullAway[NullAway] or an IDE that supports JSpecify annotations such as IntelliJ IDEA.
17+
The checks are available automatically with Kotlin which translates the JSpecify annotations into Kotlin's null safety.
18+
19+
To learn more about null safety with Spring, refer to the {spring-framework-docs}/core/null-safety.html[Spring Framework reference documentation].
20+
921
[[web-service-messages]]
1022
== Web Service Messages
1123

spring-ws-docs/src/docs/asciidoc/index.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Arjen Poutsma, Rick Evans, Tareq Abed Rabbo, Greg Turnquist, Jay Bryant, Corneil
1010
:docs-site: https://docs.spring.io
1111
:spring-framework-docs-root: {docs-site}/spring-framework/docs
1212
:spring-framework-api: {spring-framework-docs-root}/{spring-framework-version}/javadoc-api/org/springframework
13-
:spring-framework-docs: https://docs.spring.io/spring-framework/reference
13+
:spring-framework-docs: https://docs.spring.io/spring-framework/reference/7.0
1414
:spring-ws-docs-root: {docs-site}/spring-ws/docs
1515
:spring-ws-api: {spring-ws-docs-root}/{spring-ws-version}/api/org/springframework/ws
1616

0 commit comments

Comments
 (0)