Skip to content

Conversation

chemicL
Copy link
Member

@chemicL chemicL commented Sep 18, 2025

reactor-core 3.8.0-SNAPSHOT includes the migration from JSR-305-based nullability annotations to JSpecify.
This change adapts the spring-framework codebase to the changes caused by better nullability markers.

@sdeleuze please review and if something needs to change on the reactor-core side, I'd be happy to incorporate those recommendations.

Signed-off-by: Dariusz Jędrzejczyk <[email protected]>
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Sep 18, 2025
@sdeleuze sdeleuze self-assigned this Sep 18, 2025
@sdeleuze sdeleuze added type: task A general task and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Sep 18, 2025
@sdeleuze sdeleuze added this to the 7.0.0-RC1 milestone Sep 18, 2025
return adapter.fromPublisher(Flux.from(Mono.fromFuture(cachedFuture))
.switchIfEmpty(Flux.defer(() -> (Flux) evaluate(null, invoker, method, contexts)))
.flatMap(v -> evaluate(valueToFlux(v, contexts), invoker, method, contexts))
.switchIfEmpty(Flux.defer(() -> (Flux) Objects.requireNonNull(evaluate(null, invoker, method, contexts))))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For code on the hot path, in reactor-core, I used assertions to silence the warnings where I knew nullable API is not returning a null value. I wasn't sure what strategy you'd like to take so I left a TODO somewhere near requireNonNull to address this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: task A general task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants