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

Multi flatMapOptional #3387

Merged
merged 3 commits into from
Sep 23, 2021
Merged

Conversation

danielkec
Copy link
Contributor

@danielkec danielkec commented Sep 8, 2021

// Item "test" is inlined, same as flatMapping Single.just("test")
Single.just(Optional.of("test"))
          .flatMapOptional(Function.identity())        
          .await();
> test

// No item is inlined from empty optional, same as flatmapping Single.empty()
Single.just(Optional.<String>empty())
          .flatMapOptional(Function.identity())
          .defaultIfEmpty(() -> "Nothing here!")
          .await();
> Nothing here!

See #3382 for more info

Signed-off-by: Daniel Kec daniel.kec@oracle.com

Signed-off-by: Daniel Kec <daniel.kec@oracle.com>
@danielkec danielkec added the reactive Reactive streams and related components label Sep 8, 2021
@danielkec danielkec self-assigned this Sep 8, 2021
@danielkec danielkec mentioned this pull request Sep 8, 2021
9 tasks
Signed-off-by: Daniel Kec <daniel.kec@oracle.com>
tomas-langer
tomas-langer previously approved these changes Sep 23, 2021
Copy link
Member

@tomas-langer tomas-langer left a comment

Choose a reason for hiding this comment

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

LGTM

…ional

# Conflicts:
#	common/reactive/src/main/java/io/helidon/common/reactive/Single.java
Copy link
Member

@tomas-langer tomas-langer left a comment

Choose a reason for hiding this comment

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

LGTM

@danielkec danielkec merged commit 65f196f into helidon-io:master Sep 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
reactive Reactive streams and related components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants