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

Support suppressed exceptions when trimming stack trace #1451

Merged
merged 3 commits into from
May 26, 2017

Conversation

panchenko
Copy link
Contributor

Fixes #1426

}

private static boolean hasSuppressed(Throwable exception) {
if (getSuppressed != null) {
Copy link
Member

Choose a reason for hiding this comment

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

nit: I personally prefer existing out on error conditions early, to avoid over-intentation:

if (getSuppressed == null) {
  return false;
}
try {
  ...
} catch (Throwable e) {
  return false;
}

@kcooney kcooney added the 4.13 label May 25, 2017
@kcooney kcooney merged commit 563d32c into junit-team:master May 26, 2017
@kcooney kcooney modified the milestone: 4.13 Aug 6, 2017
@kcooney kcooney removed the 4.13 label Aug 6, 2017
@panchenko panchenko deleted the trim_suppressed branch February 10, 2018 09:17
sebasjm pushed a commit to sebasjm/junit4 that referenced this pull request Mar 11, 2018
aristotle0x01 pushed a commit to aristotle0x01/junit4 that referenced this pull request Jun 27, 2022
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

Successfully merging this pull request may close these issues.

2 participants