Reactor-core: Explicit nullability for Reactor API parameters and return values

Created on 22 May 2017  路  1Comment  路  Source: reactor/reactor-core

Similar to what I am working on for Spring side, in order to get full null safety from Kotlin and warnings in IDEA/Eclipse for Java users. See https://jira.spring.io/browse/SPR-15540 and https://github.com/spring-projects/spring-framework/compare/master...sdeleuze:null-safety

typchores wide-change

Most helpful comment

The annotations have been put in place. @NonNullApi is a reactor-specific annotation based on meta-annotations from JSR305, on the exact same mode as the one introduced by @sdeleuze in Spring 5. @Nullable on the other hand is the JSR305 annotation directly.

This is less critical for us than for Spring to completely decouple from the JSR305 dependency, and using the Nullable annotation limits the proliferation of such annotations.

>All comments

The annotations have been put in place. @NonNullApi is a reactor-specific annotation based on meta-annotations from JSR305, on the exact same mode as the one introduced by @sdeleuze in Spring 5. @Nullable on the other hand is the JSR305 annotation directly.

This is less critical for us than for Spring to completely decouple from the JSR305 dependency, and using the Nullable annotation limits the proliferation of such annotations.

Was this page helpful?
0 / 5 - 0 ratings