Skip to content

Conversation

@chemicL
Copy link
Member

@chemicL chemicL commented Dec 5, 2025

Since the operator delivers null as a result in case of an empty Mono, the Consumer<? super T> needs to change to allow nullable references. Consumer<? super @Nullable T> is the generic declaration that allows proper inference, especially by Kotlin, that the Consumer's argument can be null.

Resolves #4151

Since the operator delivers `null` as a result in case of an empty
`Mono`, the `Consumer<? super T>` needs to change to allow nullable
references. `Consumer<? super @nullable T>` is the generic declaration
that allows proper inference, especially by Kotlin, that the
`Consumer`'s argument can be `null`.

Resolves #4151

Signed-off-by: Dariusz Jędrzejczyk <dariusz.jedrzejczyk@broadcom.com>
@chemicL chemicL added this to the 3.8.1 milestone Dec 5, 2025
@chemicL chemicL requested a review from a team as a code owner December 5, 2025 12:19
@chemicL chemicL added the type/bug A general bug label Dec 5, 2025
Signed-off-by: Dariusz Jędrzejczyk <dariusz.jedrzejczyk@broadcom.com>
@chemicL chemicL merged commit 5b11ecc into main Dec 5, 2025
15 of 16 checks passed
@chemicL chemicL deleted the mono-do-on-success-nullability branch December 5, 2025 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type/bug A general bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

After applying JSpecify, there are cases where a runtime NPE occurs in Kotlin

2 participants