Skip to content

Commit

Permalink
Fixed reverse order of exception and tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lehel44 committed Jun 21, 2021
1 parent 4e5054a commit 246bcea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,6 @@ private String getCauses(final Throwable throwable) {
for (Throwable t = throwable; t != null; t = t.getCause()) {
causes.push(t.toString());
}
Collections.reverse(causes);
return causes.stream().collect(Collectors.joining(System.lineSeparator() + CAUSES));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@
public class TestSimpleProcessLogger {

private static final String NEW_LINE_ARROW = "\u2517\u25B6";
private static final String EXPECTED_CAUSES = "java.lang.RuntimeException: first" + System.lineSeparator() +
private static final String EXPECTED_CAUSES = "java.lang.RuntimeException: third" + System.lineSeparator() +
NEW_LINE_ARROW + " causes: java.lang.RuntimeException: second" + System.lineSeparator() +
NEW_LINE_ARROW + " causes: java.lang.RuntimeException: third";
NEW_LINE_ARROW + " causes: java.lang.RuntimeException: first";

private final Exception e = new RuntimeException("first", new RuntimeException("second", new RuntimeException("third")));

Expand Down

0 comments on commit 246bcea

Please sign in to comment.