This commit introduces 2 new @Nullable and @NonNullApi
annotations that leverage JSR 305 (dormant but available via
Findbugs jsr305 dependency and already used by libraries
like OkHttp) meta-annotations to specify explicitly
null-safety of Spring Framework parameters and return values.
In order to avoid adding too much annotations, the
default is set at package level with @NonNullApi and
@Nullable annotations are added when needed at parameter or
return value level. These annotations are intended to be used
on Spring Framework itself but also by other Spring projects.
@Nullable annotations have been introduced based on Javadoc
and search of patterns like "return null;". It is expected that
nullability of Spring Framework API will be polished with
complementary commits.
In practice, this will make the whole Spring Framework API
null-safe for Kotlin projects (when KT-10942 will be fixed)
since Kotlin will be able to leverage these annotations to
know if a parameter or a return value is nullable or not. But
this is also useful for Java developers as well since IntelliJ
IDEA, for example, also understands these annotations to
generate warnings when unsafe nullable usages are detected.
Issue: SPR-15540
This commit also changes "hibval5Version" to the more general "hibvalVersion" build variable, and includes dependency updates to Caffeine 2.5.1 and JRuby 9.1.9.
Issue: SPR-13482
The MultipartHttpMessageWriter now directly encodes part header values
defaulting to UTF-8 and also specifies the charset in the
Content-Type header for the entire request.
This should work with something commonly used like Apache Commons
FileUpload which checks request.getCharacterEncoding() and uses it
for reading headers.
This commit introduces reactive multipart support by adding a new
MultipartHttpMessageReader interface (with default methods) and a
SynchronossMultipartHttpMessageReader implementation based on
the Synchronoss NIO Multipart implementation
(https://github.com/synchronoss/nio-multipart).
Issue: SPR-14546
This commit introduces an explicit dependency on the latest JUnit
Vintage TestEngine so that it overrides whatever is bundled by
default in IntelliJ IDEA.
This allows for a more seamless upgrade to newer versions of JUnit 5 and
the JUnit Platform before IDEA has been officially updated to support
those versions, while simultaneously allowing developers to continue
to execute JUnit 4 based tests within IDEA.
This commit introduces an explicit dependency on the latest JUnit
Platform Launcher API so that it overrides whatever is bundled by
default in IntelliJ IDEA.
This allows a more seamless upgrade to newer versions of JUnit 5 and
the JUnit Platform before IDEA has been officially updated to support
those versions.
This commit adds support for reactive library types to be returned
directly from controller methods adapting them either to a
ResponseBodyEmitter (streaming) or DeferredResult (non-streaming).
The reactive libraries supported are the ones that can adapted to a
Reactive Streams Publisher through the ReactiveAdapterRegistry.
Issue: SPR-15365
This commit removes docbook from the documentation toolchain and
instead makes use of asciidoctor to render the reference documentation
in HTML and PDF formats.
The main Gradle build has been refactored with the documentation tasks
and sniffer tasks extracted to their own gradle file in the "gradle"
folder.
A new asciidoctor Spring theme is also used to render the HTML5 backend.
Issue: SPR-14997