Skip to content

Commit ad50c26

Browse files
committed
Fix NPE in TestRunSession.toString()
1 parent 31bb835 commit ad50c26

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

debug/org.eclipse.unittest.ui/src/org/eclipse/unittest/internal/model/TestRunSession.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -590,6 +590,10 @@ private void addFailures(Collection<TestElement> failures, TestElement testEleme
590590

591591
@Override
592592
public String toString() {
593+
Instant startTime = getStartTime();
594+
if (startTime == null) {
595+
return fTestRunName + " (not started)"; //$NON-NLS-1$
596+
}
593597
return fTestRunName + " " + DateFormat.getDateTimeInstance().format(new Date(fStartTime.toEpochMilli())); //$NON-NLS-1$
594598
}
595599

0 commit comments

Comments
 (0)