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

Improper exception behavior of AbstractInvocationFuture.thenApply #17515

Closed
viliam-durina opened this issue Sep 9, 2020 · 0 comments · Fixed by #17518
Closed

Improper exception behavior of AbstractInvocationFuture.thenApply #17515

viliam-durina opened this issue Sep 9, 2020 · 0 comments · Fixed by #17518
Assignees
Labels
Module: IMap Source: Internal PR or issue was opened by an employee Source: Jet Issues/PRs needed for Jet, but in other modules than Jet Team: Core Type: Defect
Milestone

Comments

@viliam-durina
Copy link
Contributor

map.getAsync("k")
           .thenApply(v -> {throw new RuntimeException("foo");})
           .toCompletableFuture()
           .get();

Expected behavior
I expect the get call in the above code to throw the foo exception, wrapped in java.util.concurrent.ExecutionException. In other words, it should be equivalent to standard CompletableFuture:

        CompletableFuture.completedFuture("bar")
                .thenApply(v -> { throw new RuntimeException("foo"); })
                .get();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Module: IMap Source: Internal PR or issue was opened by an employee Source: Jet Issues/PRs needed for Jet, but in other modules than Jet Team: Core Type: Defect
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants