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

Fixes AbstractInvocationFuture#thenApply #17518

Merged
merged 2 commits into from Sep 11, 2020

Conversation

vbekiaris
Copy link
Collaborator

@vbekiaris vbekiaris commented Sep 10, 2020

When a user function is registered on a not-yet
complete future, the ApplyNode would not catch
an exception thrown from the user function. Now it
is caught and completes exceptionally the returned
CompletionStage.

Also added tests for DelegatingCompletableFuture's
completion stage API methods when wrapping
InvocationFuture and InternalCompletableFuture.

Fixes #17515 on master.
Backport will follow once this PR is merged

When a user function is registered on a not-yet
complete future, the ApplyNode would not catch
an exception thrown from the user function. Now it
is caught and completes exceptionally the returned
CompletionStage.
Copy link
Contributor

@blazember blazember left a comment

Choose a reason for hiding this comment

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

LGTM

@mmedenjak mmedenjak added the Source: Internal PR or issue was opened by an employee label Sep 10, 2020
@@ -1065,12 +1163,17 @@ public void acceptEitherAsync() {
}

@Test
public void applyToEitherAsync_onIncompleteFuture_whenExecutionRejected() {
public void acceptEither_whenActionThrowsException() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Bad indentation

@vbekiaris vbekiaris merged commit cbd52fa into hazelcast:master Sep 11, 2020
@mmedenjak mmedenjak removed the request for review from sancar September 14, 2020 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Source: Internal PR or issue was opened by an employee Team: Core Type: Defect
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improper exception behavior of AbstractInvocationFuture.thenApply
6 participants