branch feature/sync updated (431e815 -> 2ec9c11)
This is an automated email from the git hooks/post-receive script. New change to branch feature/sync in repository jtimer. See https://gitlab.nuiton.org/chorem/jtimer.git from 431e815 added the gson library to the project to enable easier generation of json output for the updates, adapted the update functions to accomodate (removed useless prettyfier) new 2ec9c11 changed the return of taskToJSONFormat back to String (to avoid having several toString() in the TimerTaskUpdaterView, when it can be done once in the method) The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit 2ec9c11cd08d6cdfdb155e3ac28c27f02031edba Author: servantie <servantie.c@gmail.com> Date: Mon May 23 17:20:24 2016 +0200 changed the return of taskToJSONFormat back to String (to avoid having several toString() in the TimerTaskUpdaterView, when it can be done once in the method) Summary of changes: src/main/java/org/chorem/jtimer/entities/TimerTaskHelper.java | 10 ++++++---- .../java/org/chorem/jtimer/ui/report/TimerTaskUpdaterView.java | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
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 2ec9c11cd08d6cdfdb155e3ac28c27f02031edba Author: servantie <servantie.c@gmail.com> Date: Mon May 23 17:20:24 2016 +0200 changed the return of taskToJSONFormat back to String (to avoid having several toString() in the TimerTaskUpdaterView, when it can be done once in the method) --- src/main/java/org/chorem/jtimer/entities/TimerTaskHelper.java | 10 ++++++---- .../java/org/chorem/jtimer/ui/report/TimerTaskUpdaterView.java | 2 +- 2 files changed, 7 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 c513ae0..e6fe4c2 100644 --- a/src/main/java/org/chorem/jtimer/entities/TimerTaskHelper.java +++ b/src/main/java/org/chorem/jtimer/entities/TimerTaskHelper.java @@ -341,10 +341,10 @@ public class TimerTaskHelper { * @param task the task to make a JSON from * @return result the string in JSON */ - public static JsonObject taskToJSONFormat(TimerTask task, boolean withAnnotations) { + public static String taskToJSONFormat(TimerTask task, boolean withAnnotations) { Date startDate = task.getCreationDate(); Date endDate = new Date(); - JsonObject resultingJSON = taskToJSONFormat(task, startDate, endDate, withAnnotations); + String resultingJSON = taskToJSONFormat(task, startDate, endDate, withAnnotations); return resultingJSON; } @@ -360,7 +360,7 @@ public class TimerTaskHelper { * @param withAnnotations true if annotations included * @return result the string in JSON */ - public static JsonObject taskToJSONFormat(TimerTask task, Date startDate, Date endDate, boolean withAnnotations) { + public static String taskToJSONFormat(TimerTask task, Date startDate, Date endDate, boolean withAnnotations) { JsonObject responseJSON = new JsonObject(); LocalDate startPeriodDate = startDate.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); LocalDate endPeriodDate = endDate.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); @@ -395,6 +395,8 @@ public class TimerTaskHelper { responseJSON.addProperty("startDate", startPeriodDate.toString()); responseJSON.addProperty("endDate", endPeriodDate.toString()); responseJSON.add("periods", periodArray ); - return responseJSON; + String response = responseJSON.toString(); + + return response; } } diff --git a/src/main/java/org/chorem/jtimer/ui/report/TimerTaskUpdaterView.java b/src/main/java/org/chorem/jtimer/ui/report/TimerTaskUpdaterView.java index 73936b4..20e18f9 100644 --- a/src/main/java/org/chorem/jtimer/ui/report/TimerTaskUpdaterView.java +++ b/src/main/java/org/chorem/jtimer/ui/report/TimerTaskUpdaterView.java @@ -74,7 +74,7 @@ public class TimerTaskUpdaterView extends FrameView implements DocumentListener /** update output view*/ protected JTextArea updateArea; - protected JsonObject updateJson; + protected String updateJson; /** task to update */ protected TimerTask task; -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm