Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HELP] Using meta for project-reactor #1053

Open
Khepu opened this issue Apr 24, 2022 · 0 comments
Open

[HELP] Using meta for project-reactor #1053

Khepu opened this issue Apr 24, 2022 · 0 comments

Comments

@Khepu
Copy link

Khepu commented Apr 24, 2022

Hello!

I have kind of a weird question. I doubt that this can be done at the current state of the project, but one can hope.

I am trying to get some form of guarantee about the properties of my stream in project-reactor. For example:

data class Item(val id: String?, val name: String)

Flux.just(
        Item(id = null, name = "item"),
        Item(id = "1", name = "another item"))
    .filter { it.id != null }
    .doOnNext { println(it.id) } // At this point the id field should be inferred as non-nullable

I had a look at the Laws section of the documentation, which is what you would normally use to extend support to 3rd party libraries, but I can't see that working here.

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

No branches or pull requests

1 participant