This is an automated email from the git hooks/post-receive script. New commit to branch feature/sync in repository jtimer. See https://gitlab.nuiton.org/chorem/jtimer.git commit 1c61069d1800ef314fca3fbcfe69cbdea05a9b7b Author: servantie <servantie.c@gmail.com> Date: Mon Jul 25 10:24:44 2016 +0200 removed unreachable case --- src/main/java/org/chorem/jtimer/entities/TimerTaskHelper.java | 7 +++---- .../java/org/chorem/jtimer/ui/report/TimerTaskSyncInfoEditor.java | 3 --- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/main/java/org/chorem/jtimer/entities/TimerTaskHelper.java b/src/main/java/org/chorem/jtimer/entities/TimerTaskHelper.java index c2cd0bc..cb36da5 100644 --- a/src/main/java/org/chorem/jtimer/entities/TimerTaskHelper.java +++ b/src/main/java/org/chorem/jtimer/entities/TimerTaskHelper.java @@ -38,6 +38,7 @@ import java.util.List; import java.util.Map; import java.util.SortedMap; import java.util.TreeMap; +import org.apache.commons.lang3.time.DateUtils; import org.nuiton.util.DateUtil; /** @@ -347,7 +348,7 @@ public class TimerTaskHelper { */ public static List<JsonObject> taskToJSONFormat(TimerTask task, boolean withAnnotations, String timezone) { Date startDate = task.getAllDaysAndTimes().firstKey(); - Date endDate = DateUtil.createDateAfterToday(1,0,0); + Date endDate = DateUtils.ceiling(new Date(), Calendar.DAY_OF_MONTH); //get the current day too by making endDate a day later endDate.setTime(endDate.getTime()); List<JsonObject> resultingJSON = taskToJSONFormat(task, startDate, endDate, withAnnotations, timezone); @@ -448,9 +449,7 @@ public class TimerTaskHelper { JsonObject resultingObject = new JsonObject(); if (task.getAllDaysAndTimes().size() > 0) { Date startDate = task.getAllDaysAndTimes().firstKey(); - Date endDate = new Date(); - //get the current day too by making endDate a day later - endDate.setTime(endDate.getTime() + 86400 * 1000L); + Date endDate = DateUtils.ceiling(new Date(), Calendar.DAY_OF_MONTH); resultingObject = taskURLToJSONObject(task, url, startDate, endDate, withAnnotations, timezone); } return resultingObject; diff --git a/src/main/java/org/chorem/jtimer/ui/report/TimerTaskSyncInfoEditor.java b/src/main/java/org/chorem/jtimer/ui/report/TimerTaskSyncInfoEditor.java index 76e5a2c..e2f7e29 100644 --- a/src/main/java/org/chorem/jtimer/ui/report/TimerTaskSyncInfoEditor.java +++ b/src/main/java/org/chorem/jtimer/ui/report/TimerTaskSyncInfoEditor.java @@ -305,9 +305,6 @@ public class TimerTaskSyncInfoEditor extends FrameView implements ActionListener case 2: syncInfo.setWithAnnotations((Boolean) value); break; - case 3: - syncInfo.setWithAnnotations((Boolean) value); - break; } core.getData().syncInfoChanged(task, syncInfo); } -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.