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 5790868e4efc1e6e152150aaf493dc3b726f9671 Author: servantie <servantie.c@gmail.com> Date: Wed May 18 10:07:43 2016 +0200 small typo corrected with " at the wrong places or missing in the json output --- src/main/java/org/chorem/jtimer/entities/TimerTaskHelper.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/org/chorem/jtimer/entities/TimerTaskHelper.java b/src/main/java/org/chorem/jtimer/entities/TimerTaskHelper.java index 7b54efc..49b1060 100644 --- a/src/main/java/org/chorem/jtimer/entities/TimerTaskHelper.java +++ b/src/main/java/org/chorem/jtimer/entities/TimerTaskHelper.java @@ -356,8 +356,6 @@ public class TimerTaskHelper { * @return result the string in JSON */ public static String taskToJSONFormat(TimerTask task, Date startDate, Date endDate) { - //todo : change id with something else ? - String taskID = Integer.toString(task.getNumber()); String resultingJSON = "{\"URL\":\"" + task.getSynchronisingURL()+ "\",\"periods\":" + getTimesAndCommentsJSON(task, startDate, endDate) +"}"; return resultingJSON; } @@ -381,16 +379,18 @@ public class TimerTaskHelper { for (SortedMap.Entry<Date, Long> entry : dates.entrySet()) { //adding id, startDate and duration //converting Date to LocalDate (to ease the .toString()) - //todo:deal with timezones ? + //deal with timezones ? LocalDate date = entry.getKey().toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); - result = result + "{\"id\":"+ sequence + "\",\"startDate\":\"" + date.toString() + "T00:00:00" + - "\",\"duration\":\"" + Long.toString(entry.getValue()) + ",\"info\":\""; + result = result + "{\"id\":\""+ sequence + "\",\"startDate\":\"" + date.toString() + "T00:00:00" + + "\",\"duration\":" + Long.toString(entry.getValue()) + ",\"info\":\""; //adding comments (if there are any) if (getAnnotation(task, entry.getKey()).size() != 0) { for (String s : getAnnotation(task, entry.getKey())) { result = result + s + ","; } + //remove trailing comma + result = result.substring(0, result.length()-1); } result = result + "\"},"; ++sequence; -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.