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

1.x: Fix NPE in CompositeException when nested throws on initCause #3620

Merged
merged 1 commit into from
Feb 6, 2016
Merged

1.x: Fix NPE in CompositeException when nested throws on initCause #3620

merged 1 commit into from
Feb 6, 2016

Conversation

msavitskiy
Copy link

possible solution :)

@akarnokd
Copy link
Member

👍

@@ -122,6 +122,7 @@ public synchronized Throwable getCause() {
// ignore
// the javadocs say that some Throwables (depending on how they're made) will never
// let me call initCause without blowing up even if it returns null
chain = e;
}
chain = chain.getCause();
Copy link
Member

Choose a reason for hiding this comment

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

I think this line should be moved into the try clause. Otherwise, chain will be assigned twice here.

Copy link
Author

Choose a reason for hiding this comment

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

@zsxwing done.

@akarnokd akarnokd added the Bug label Jan 22, 2016
@akarnokd akarnokd changed the title Fix NPE in CompositeException when nested throws on initCause 1.x: Fix NPE in CompositeException when nested throws on initCause Jan 22, 2016
@artem-zinnatullin
Copy link
Contributor

👍

@msavitskiy can you please squash commits in your PR into one?

@msavitskiy
Copy link
Author

@artem-zinnatullin I make squash commits. I did the right thing?

@artem-zinnatullin
Copy link
Contributor

@msavitskiy mm, nope…

Basically you should have one commit after squash done right. I'd suggest to read documentation and some examples (maybe even videos) about git rebase.

If it'll be blocker for merge I can squash your PR and resubmit it (you'll still be author of the commit!)

Move line to try block. For avoid assigned twice.
@msavitskiy
Copy link
Author

@artem-zinnatullin Now everything is fine?

@artem-zinnatullin
Copy link
Contributor

@msavitskiy yes, thanks!

@stevegury
Copy link
Member

👍

akarnokd added a commit that referenced this pull request Feb 6, 2016
1.x: Fix NPE in CompositeException when nested throws on initCause
@akarnokd akarnokd merged commit eb39120 into ReactiveX:1.x Feb 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants