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

Single add forSingle and exceptionallyAccept #2121

Merged
merged 5 commits into from
Aug 10, 2020

Conversation

danielkec
Copy link
Contributor

Add terminal operation forEach equivalent to Single:

Single.just("test")
                .forSingle(s -> System.out.println(">>>" + s));
>>>test

Add exceptionallyAccept which takes consumer as parameter to CompletionAwaitable so there is no need to return something all the time, so instead of:

        Single.error(testException)
                .exceptionally(t -> {
                    t.printStackTrace();
                    return null;
                })

Is possible:

        Single.error(testException)
                .exceptionallyAccept(Throwable::printStackTrace);

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

Signed-off-by: Daniel Kec <daniel.kec@oracle.com>
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 Jul 2, 2020
@danielkec danielkec self-assigned this Jul 2, 2020
Signed-off-by: Daniel Kec <daniel.kec@oracle.com>
Signed-off-by: Daniel Kec <daniel.kec@oracle.com>

Signed-off-by: Daniel Kec <daniel.kec@oracle.com>
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 ea36194 into helidon-io:master Aug 10, 2020
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.

3 participants