This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository jtimer. See https://gitlab.nuiton.org/chorem/jtimer.git commit f84cd6d0088a96d816f33e45d84be1bc937c912e Author: Eric Chatellier <chatellier@codelutin.com> Date: Tue Aug 2 09:59:57 2016 +0200 fixes #1366: Application freeze after computer resume from hibernate --- .../jtimer/ui/treetable/ProjectsAndTasksModel.java | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/chorem/jtimer/ui/treetable/ProjectsAndTasksModel.java b/src/main/java/org/chorem/jtimer/ui/treetable/ProjectsAndTasksModel.java index edfff82..18b08f6 100644 --- a/src/main/java/org/chorem/jtimer/ui/treetable/ProjectsAndTasksModel.java +++ b/src/main/java/org/chorem/jtimer/ui/treetable/ProjectsAndTasksModel.java @@ -139,12 +139,24 @@ public class ProjectsAndTasksModel extends AbstractTreeTableModel implements value = task.getName(); break; case 1: - value = DurationFormatUtils.formatDuration(TimerTaskHelper - .getTotalTime(task, new Date()), "HH:mm:ss"); + long duration = TimerTaskHelper.getTotalTime(task, new Date()); + if (duration < 0) { + if (log.isWarnEnabled()) { + log.warn("Trying to format negative duration for task : " + duration); + } + duration = 0; + } + value = DurationFormatUtils.formatDuration(duration, "HH:mm:ss"); break; case 2: - value = DurationFormatUtils.formatDuration(TimerTaskHelper - .getAllTotalTime(task), "HH:mm:ss"); + long totalDuration = TimerTaskHelper.getAllTotalTime(task); + if (totalDuration < 0) { + if (log.isWarnEnabled()) { + log.warn("Trying to format negative total duration for task : " + totalDuration); + } + totalDuration = 0; + } + value = DurationFormatUtils.formatDuration(totalDuration, "HH:mm:ss"); break; } } else { -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.