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

Future.failedFuture returns successful future if cause is null #1426

Closed
dazraf opened this issue May 18, 2016 · 2 comments
Closed

Future.failedFuture returns successful future if cause is null #1426

dazraf opened this issue May 18, 2016 · 2 comments

Comments

@dazraf
Copy link

dazraf commented May 18, 2016

A question from our team:

Should Future.failedFuture always return a failed future?
At present failedFuture(null) returns a succeeded future.

Agree that we should never call failedFuture with null, but it can happen by accident ... and depending on the complexity of the system, finding the root cause can take some time.

Also perhaps, calling Future.fail(null) should really set the cause to NoStackTraceThrowable.

@dazraf dazraf closed this as completed May 18, 2016
@dazraf dazraf reopened this May 18, 2016
@vietj
Copy link
Member

vietj commented May 18, 2016

can you provide a failing unit test ?

@dazraf
Copy link
Author

dazraf commented May 18, 2016

@vietj vietj closed this as completed in 83b6889 May 21, 2016
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

2 participants