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
Handle null Throwable stack trace to avoid NullPointerException #2168
Conversation
This fixes gradle#1618 When an exception with null pointer stackTrace (usually a mock exception) is thrown in test, ExceptionPlaceholder can't handle it correctly and throws a NPE. This commit set the stackTrace to empty array if it's null. An unit test is provided.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for providing the pull request. Could you please also add an integration test that demonstrates the correct behavior? The reporter of the problem provided a sample project that might be useful.
@blindpirate Just making sure you saw my comments. Are you planning to address those soon? |
Sure, I missed it. I'll tackle it today. |
Sorry for the delay, and this is the first time I write an integration test from scratch, so please let me know if there's anything inappropriate. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for providing the integration tests. I am going to merge this PR soon.
Thanks for the pull request. It has been merged. |
Context
See #1618
Contributor Checklist
<subproject>/src/test
) to verify logic./gradlew quickCheck <impacted-subproject>:check