Skip to content

Commit c977f88

Browse files
author
Bytekeeper
committed
Reported duration should not be negative
1 parent d0cfbc5 commit c977f88

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/java/org/stt/reporting/SummingReportGenerator.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ public Report createReport() {
6161
endOfReport = end;
6262

6363
Duration duration = Duration.between(start, end);
64+
if (duration.isNegative()) {
65+
duration = Duration.ZERO;
66+
}
6467
String comment = item.getActivity();
6568
if (collectingMap.containsKey(comment)) {
6669
Duration oldDuration = collectingMap.get(comment);

0 commit comments

Comments
 (0)