From 463083bfe09d5b930035d8bc6b1ffaf28236eb07 Mon Sep 17 00:00:00 2001 From: Oleg Sukhodolsky Date: Tue, 10 Jul 2012 11:57:49 +0400 Subject: [PATCH] RUBY-8737: fixed test failures cause by fix for the ticket. Need to move check for null one level deeper. --- .../sm/runner/states/TestFailedState.java | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/platform/smRunner/src/com/intellij/execution/testframework/sm/runner/states/TestFailedState.java b/platform/smRunner/src/com/intellij/execution/testframework/sm/runner/states/TestFailedState.java index f18f5d20eeec..8906bd1867a9 100644 --- a/platform/smRunner/src/com/intellij/execution/testframework/sm/runner/states/TestFailedState.java +++ b/platform/smRunner/src/com/intellij/execution/testframework/sm/runner/states/TestFailedState.java @@ -69,22 +69,21 @@ public class TestFailedState extends AbstractState { { boolean addMark = setMark; for (final String errorText : errorPresentationText) { - printer.print(CompositePrintable.NEW_LINE, ConsoleViewContentType.ERROR_OUTPUT); - if (addMark) { - printer.mark(); - addMark = false; + if (errorText != null) { + printer.print(CompositePrintable.NEW_LINE, ConsoleViewContentType.ERROR_OUTPUT); + if (addMark) { + printer.mark(); + addMark = false; + } + printer.print(errorText, ConsoleViewContentType.ERROR_OUTPUT); } - printer.print(errorText, ConsoleViewContentType.ERROR_OUTPUT); } } @Override public void printOn(final Printer printer) { super.printOn(printer); - - if (myPresentationText != null) { - printError(printer, myPresentationText); - } + printError(printer, myPresentationText); } public boolean isDefect() {