branch feature/sync updated (eec2299 -> 68a6cc9)
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 eec2299 corrected a variable name new 065aaf9 removed an unused method new d8f9541 adding a lastSync at the exit of jtimer new ee05750 1488a94 modified json creation to not iterate on inactive urls, and optimized a little new 162928d modified the taskToJSONFormat method to include the current day new 68a6cc9 corrected all the imports with * The 5 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 68a6cc994554f1341e0ddac242e95ae86668b38c Author: servantie <servantie.c@gmail.com> Date: Wed Jun 29 17:45:17 2016 +0200 corrected all the imports with * commit 162928dba94c643a5c8475aedc7e49c23a70640f Author: servantie <servantie.c@gmail.com> Date: Wed Jun 29 16:33:33 2016 +0200 modified the taskToJSONFormat method to include the current day commit ee0575035d3057a6f3888ca49b8aa0872732f2a6 Author: servantie <servantie.c@gmail.com> Date: Wed Jun 29 15:18:59 2016 +0200 1488a94 modified json creation to not iterate on inactive urls, and optimized a little commit d8f9541cc0b5af29ce312d48fc73b0c31d6d86df Author: servantie <servantie.c@gmail.com> Date: Wed Jun 29 11:58:27 2016 +0200 adding a lastSync at the exit of jtimer (syncs the tasks that have been added to the synchronizer for one last time) commit 065aaf9d0b67d617eef2a173a3dccaea8acd4b92 Author: servantie <servantie.c@gmail.com> Date: Mon Jun 27 10:11:11 2016 +0200 removed an unused method Summary of changes: src/main/java/org/chorem/jtimer/JTimer.java | 5 +- src/main/java/org/chorem/jtimer/JTimerConfig.java | 2 +- .../org/chorem/jtimer/data/DataEventListener.java | 5 +- .../java/org/chorem/jtimer/data/TimerCore.java | 3 +- .../java/org/chorem/jtimer/entities/TimerTask.java | 25 +++--- .../chorem/jtimer/entities/TimerTaskHelper.java | 93 ++++++++++++---------- .../chorem/jtimer/io/GTimerIncrementalSaver.java | 5 +- .../chorem/jtimer/io/TimerTaskSynchronizer.java | 76 ++++++++++++++---- .../jtimer/ui/report/TimerTaskUpdaterView.java | 31 ++++++-- .../jtimer/io/GTimerIncrementalSaverTest.java | 13 ++- 10 files changed, 175 insertions(+), 83 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 065aaf9d0b67d617eef2a173a3dccaea8acd4b92 Author: servantie <servantie.c@gmail.com> Date: Mon Jun 27 10:11:11 2016 +0200 removed an unused method --- .../java/org/chorem/jtimer/entities/TimerTask.java | 19 ------------------- .../org/chorem/jtimer/io/GTimerIncrementalSaver.java | 1 + 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/src/main/java/org/chorem/jtimer/entities/TimerTask.java b/src/main/java/org/chorem/jtimer/entities/TimerTask.java index 1285a53..009b000 100644 --- a/src/main/java/org/chorem/jtimer/entities/TimerTask.java +++ b/src/main/java/org/chorem/jtimer/entities/TimerTask.java @@ -280,25 +280,6 @@ public class TimerTask implements Cloneable, } /** - * Returns one String containing all the URLs for sync, separated by " , " - * @return a string of URLs - */ - public String getSynchronizingURLAsString() { - StringBuilder builder = new StringBuilder(); - for (int i = 0; i < synchronisingInfoList.size(); ++i) { - if (i == synchronisingInfoList.size()-1) { - builder.append(synchronisingInfoList.get(i).getSyncURL()); - } - else { - builder.append(synchronisingInfoList.get(i).getSyncURL()); - builder.append(" , "); - } - } - String urlListString = builder.toString(); - return urlListString; - } - - /** * Adds a new synchronization info if the url isn't already present in the list * @param url a string * @param time a LocalDateTime diff --git a/src/main/java/org/chorem/jtimer/io/GTimerIncrementalSaver.java b/src/main/java/org/chorem/jtimer/io/GTimerIncrementalSaver.java index 1c34ef5..ccf75c7 100644 --- a/src/main/java/org/chorem/jtimer/io/GTimerIncrementalSaver.java +++ b/src/main/java/org/chorem/jtimer/io/GTimerIncrementalSaver.java @@ -1720,6 +1720,7 @@ public class GTimerIncrementalSaver extends AbstractSaver implements Saver, * @param task * @param url */ + @Override public void deleteSyncInfo(TimerTask task, String url) { saveSynchronisationInfo(task); } -- 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 d8f9541cc0b5af29ce312d48fc73b0c31d6d86df Author: servantie <servantie.c@gmail.com> Date: Wed Jun 29 11:58:27 2016 +0200 adding a lastSync at the exit of jtimer (syncs the tasks that have been added to the synchronizer for one last time) --- .../java/org/chorem/jtimer/data/TimerCore.java | 3 +- .../chorem/jtimer/io/GTimerIncrementalSaver.java | 4 +- .../chorem/jtimer/io/TimerTaskSynchronizer.java | 58 +++++++++++++++++----- .../jtimer/ui/report/TimerTaskUpdaterView.java | 1 - 4 files changed, 50 insertions(+), 16 deletions(-) diff --git a/src/main/java/org/chorem/jtimer/data/TimerCore.java b/src/main/java/org/chorem/jtimer/data/TimerCore.java index 52e8b97..6abe227 100644 --- a/src/main/java/org/chorem/jtimer/data/TimerCore.java +++ b/src/main/java/org/chorem/jtimer/data/TimerCore.java @@ -201,7 +201,8 @@ public class TimerCore { if (log.isInfoEnabled()) { log.info("Exiting application"); } - + //try one last sync + synchronizer.lastSync(); // unlock fs directory try { saver.unlock(); diff --git a/src/main/java/org/chorem/jtimer/io/GTimerIncrementalSaver.java b/src/main/java/org/chorem/jtimer/io/GTimerIncrementalSaver.java index ccf75c7..29cb502 100644 --- a/src/main/java/org/chorem/jtimer/io/GTimerIncrementalSaver.java +++ b/src/main/java/org/chorem/jtimer/io/GTimerIncrementalSaver.java @@ -636,7 +636,7 @@ public class GTimerIncrementalSaver extends AbstractSaver implements Saver, } //else if there is lastSyncTime else if (urlArray.length == 3) { - DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss"); + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss.SSS"); LocalDateTime date = null; try { date = LocalDateTime.parse(urlArray[2], formatter); @@ -1185,7 +1185,7 @@ public class GTimerIncrementalSaver extends AbstractSaver implements Saver, //write lastsync (HH:MM:SS) if (sync.getLastSync() != null && sync.getLastSync().isAfter(LocalDateTime.MIN)) { //remove the milliseconds - String syncString = sync.getLastSync().toString().substring(0, sync.getLastSync().toString().length()-4); + String syncString = sync.getLastSync().toString(); out.write(syncString + "\n"); } else { diff --git a/src/main/java/org/chorem/jtimer/io/TimerTaskSynchronizer.java b/src/main/java/org/chorem/jtimer/io/TimerTaskSynchronizer.java index 45eb6bb..836cb91 100644 --- a/src/main/java/org/chorem/jtimer/io/TimerTaskSynchronizer.java +++ b/src/main/java/org/chorem/jtimer/io/TimerTaskSynchronizer.java @@ -25,7 +25,8 @@ public class TimerTaskSynchronizer implements DataEventListener { private static Log log = LogFactory.getLog(TimerTaskSynchronizer.class); /** auto sync delay */ - protected long autoSyncDelay = 1000 * 10L; //every 2 hours, check for modifications to sync + //every hour, check for modifications to sync + protected long autoSyncDelay = 1000 * 20L; /** timer to schedule syncs */ protected Timer timer; @@ -68,6 +69,16 @@ public class TimerTaskSynchronizer implements DataEventListener { } /** + * Synchronizes tasks that have been modified + */ + public void lastSync() { + log.info("Synchronizing at exit"); + for (TimerTask task : tasksToSync) { + synchronizeSingleTask(task); + } + } + + /** * Inner Task class to make the automatic sync */ protected class UpdateTask extends java.util.TimerTask { @@ -127,15 +138,10 @@ public class TimerTaskSynchronizer implements DataEventListener { if (successfulSync) { if (log.isDebugEnabled()) { log.debug("Sync successful on " + syncURL); + log.debug(LocalDateTime.now()); } task.setLastSync(LocalDateTime.now(), syncURL); } - //-> do not change last sync time - else { - if (log.isDebugEnabled()) { - log.debug("Sync failed on " + syncURL); - } - } } } @@ -167,23 +173,23 @@ public class TimerTaskSynchronizer implements DataEventListener { upDateValue = connection.getResponseCode(); } catch (MalformedURLException e) { if (log.isErrorEnabled()) { - log.error("URL malformed : " + syncURL); + log.error("URL malformed : " + syncURL + " Code : " + upDateValue); } } catch (ProtocolException e) { if (log.isErrorEnabled()) { - log.error("Protocol error."); + log.error("Protocol error."+ " Code : " + upDateValue); } } catch (UnsupportedEncodingException e) { if (log.isErrorEnabled()) { - log.error("Problem with encoding " + syncURL); + log.error("Problem with encoding " + syncURL + " Code : " + upDateValue); } } catch (IOException e) { if (log.isErrorEnabled()) { - log.error("Problem with the connection " + syncURL); + log.error("Problem with the connection " + syncURL + " Code : " + upDateValue); } }catch (IllegalArgumentException e) { if (log.isErrorEnabled()) { - log.error("Port value not valid " + syncURL); + log.error("Port value not valid " + syncURL + " Code : " + upDateValue); } } return upDateValue; @@ -238,8 +244,20 @@ public class TimerTaskSynchronizer implements DataEventListener { } + /** + * When the time is modified, the task is added to the sync list + * @param task task where time is changed + * @param date date + * @param time task time + */ @Override public void setTaskTime(TimerTask task, Date date, Long time) { + if (!tasksToSync.contains(task)) { + //add it only if the URL is not empty + if ((task.getSynchronizingURLList() != null) && !(task.getSynchronizingURLList().isEmpty())) { + tasksToSync.add(task); + } + } } @Override @@ -267,8 +285,19 @@ public class TimerTaskSynchronizer implements DataEventListener { } + /** + * Tasks are added to synchronization list when started + * @param task started task + */ + @Override public void startTask(TimerTask task) { + if (!tasksToSync.contains(task)) { + //add it only if the URL is not empty + if ((task.getSynchronizingURLList() != null) && !(task.getSynchronizingURLList().isEmpty())) { + tasksToSync.add(task); + } + } } /** * Tasks are added to synchronization list when stopped @@ -289,6 +318,11 @@ public class TimerTaskSynchronizer implements DataEventListener { } + /** + * When the syncInfo is changed, add the task to sync list + * @param task the task to sync + * @param syncURL the url to sync on (a String) + */ @Override public void changeSyncInfo(TimerTask task, String syncURL) { if (!tasksToSync.contains(task)) { 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 99612fd..01a945f 100644 --- a/src/main/java/org/chorem/jtimer/ui/report/TimerTaskUpdaterView.java +++ b/src/main/java/org/chorem/jtimer/ui/report/TimerTaskUpdaterView.java @@ -441,7 +441,6 @@ public class TimerTaskUpdaterView extends FrameView implements DocumentListener, /** * Active sync checkbox checked, activates sync - * todo: solve problem of not showing up as ticked */ @Action public boolean isActiveSync() { -- 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 ee0575035d3057a6f3888ca49b8aa0872732f2a6 Author: servantie <servantie.c@gmail.com> Date: Wed Jun 29 15:18:59 2016 +0200 1488a94 modified json creation to not iterate on inactive urls, and optimized a little --- .../java/org/chorem/jtimer/entities/TimerTask.java | 16 +++++ .../chorem/jtimer/entities/TimerTaskHelper.java | 77 +++++++++++----------- .../chorem/jtimer/io/TimerTaskSynchronizer.java | 7 +- 3 files changed, 58 insertions(+), 42 deletions(-) diff --git a/src/main/java/org/chorem/jtimer/entities/TimerTask.java b/src/main/java/org/chorem/jtimer/entities/TimerTask.java index 009b000..96cb121 100644 --- a/src/main/java/org/chorem/jtimer/entities/TimerTask.java +++ b/src/main/java/org/chorem/jtimer/entities/TimerTask.java @@ -280,6 +280,22 @@ public class TimerTask implements Cloneable, } /** + * Returns only the URLs that are active + * @return a List<String> with only active urls + */ + public List<String> getActiveSynchronizingURLList() { + List<String> resultList = new ArrayList<>(); + if (!synchronisingInfoList.isEmpty()) { + for (SyncInfo sync : synchronisingInfoList) { + if (sync.isActiveSync) { + resultList.add(sync.getSyncURL()); + } + } + } + return resultList; + } + + /** * Adds a new synchronization info if the url isn't already present in the list * @param url a string * @param time a LocalDateTime diff --git a/src/main/java/org/chorem/jtimer/entities/TimerTaskHelper.java b/src/main/java/org/chorem/jtimer/entities/TimerTaskHelper.java index 09128d2..3d53a15 100644 --- a/src/main/java/org/chorem/jtimer/entities/TimerTaskHelper.java +++ b/src/main/java/org/chorem/jtimer/entities/TimerTaskHelper.java @@ -357,49 +357,46 @@ public class TimerTaskHelper { * @return result the string in JSON */ public static List<JsonObject> taskToJSONFormat(TimerTask task, Date startDate, Date endDate, boolean withAnnotations, String timezone) { - ArrayList<JsonObject> jsonObjectList = new ArrayList<>(); - String timestamp = "T00:00:00"; - - for (String url : task.getSynchronizingURLList()) { - boolean isActive = task.getSynchronizingInfo(url).getActiveSync(); - if (isActive) { - JsonObject responseJSON = new JsonObject(); - LocalDate startPeriodDate = startDate.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); - LocalDate endPeriodDate = endDate.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); - - JsonArray periodArray = new JsonArray(); - SortedMap<Date, Long> dates = task.getAllDaysAndTimes().subMap(startDate, endDate); - if (dates.size() != 0) { - for (SortedMap.Entry<Date, Long> entry : dates.entrySet()) { - //adding id, startDate and duration - //converting Date to LocalDate (to ease the .toString()) - LocalDate date = entry.getKey().toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); - String dateString = date.toString(); - //as jtimer has time entries only for a day, the id of the times will be the date in yyyy-mm-dd format - JsonObject periodElement = new JsonObject(); - periodElement.addProperty("id", dateString); - periodElement.addProperty("startDate", dateString + timestamp + timezone); - periodElement.addProperty("duration", entry.getValue()/1000); - if (withAnnotations && !(getAnnotation(task, entry.getKey()).isEmpty())) { - StringBuilder builder = new StringBuilder(); - for (String s : getAnnotation(task, entry.getKey())) { - builder.append(s); - builder.append(","); + String timestamp = "T00:00:00" + timezone; + //start and end period dates are the same for all the objects + LocalDate startPeriodDate = startDate.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); + String startPeriodString = startPeriodDate.toString() + timestamp; + LocalDate endPeriodDate = endDate.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); + String endPeriodString = endPeriodDate.toString() + timestamp; + SortedMap<Date, Long> dates = task.getAllDaysAndTimes().subMap(startDate, endDate); + //only create jsons if there are times to send + if (dates.size() != 0) { + //iterate over active urls only + for (String url : task.getActiveSynchronizingURLList()) { + JsonObject responseJSON = new JsonObject(); + JsonArray periodArray = new JsonArray(); + for (SortedMap.Entry<Date, Long> entry : dates.entrySet()) { + //adding id, startDate and duration + //converting Date to LocalDate (to ease the .toString()) + LocalDate date = entry.getKey().toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); + String dateString = date.toString(); + //as jtimer has time entries only for a day, the id of the times will be the date in yyyy-mm-dd format + JsonObject periodElement = new JsonObject(); + periodElement.addProperty("id", dateString); + periodElement.addProperty("startDate", dateString + timestamp + timezone); + periodElement.addProperty("duration", entry.getValue()/1000); + if (withAnnotations && !(getAnnotation(task, entry.getKey()).isEmpty())) { + StringBuilder annotationBuilder = new StringBuilder(); + for (String s : getAnnotation(task, entry.getKey())) { + annotationBuilder.append(s); + annotationBuilder.append(","); + } + periodElement.addProperty("info", annotationBuilder.toString()); } - String annotations = builder.toString(); - periodElement.addProperty("info", annotations); - + periodArray.add(periodElement); } - periodArray.add(periodElement); - } - } - responseJSON.addProperty("URL", url); - responseJSON.addProperty("startDate", startPeriodDate.toString() + timestamp + timezone); - responseJSON.addProperty("endDate", endPeriodDate.toString() + timestamp + timezone); - responseJSON.add("periods", periodArray); - - jsonObjectList.add(responseJSON); + responseJSON.addProperty("URL", url); + responseJSON.addProperty("startDate", startPeriodString); + responseJSON.addProperty("endDate", endPeriodString); + responseJSON.add("periods", periodArray); + + jsonObjectList.add(responseJSON); } } return jsonObjectList; diff --git a/src/main/java/org/chorem/jtimer/io/TimerTaskSynchronizer.java b/src/main/java/org/chorem/jtimer/io/TimerTaskSynchronizer.java index 836cb91..61ceb0c 100644 --- a/src/main/java/org/chorem/jtimer/io/TimerTaskSynchronizer.java +++ b/src/main/java/org/chorem/jtimer/io/TimerTaskSynchronizer.java @@ -26,7 +26,7 @@ public class TimerTaskSynchronizer implements DataEventListener { /** auto sync delay */ //every hour, check for modifications to sync - protected long autoSyncDelay = 1000 * 20L; + protected long autoSyncDelay = 1000 * 60 * 60L; /** timer to schedule syncs */ protected Timer timer; @@ -69,11 +69,14 @@ public class TimerTaskSynchronizer implements DataEventListener { } /** - * Synchronizes tasks that have been modified + * Synchronizes at exit the tasks left in the sync */ public void lastSync() { log.info("Synchronizing at exit"); for (TimerTask task : tasksToSync) { + if (log.isDebugEnabled()) { + log.debug(task.getName()); + } synchronizeSingleTask(task); } } -- 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 162928dba94c643a5c8475aedc7e49c23a70640f Author: servantie <servantie.c@gmail.com> Date: Wed Jun 29 16:33:33 2016 +0200 modified the taskToJSONFormat method to include the current day --- src/main/java/org/chorem/jtimer/JTimerConfig.java | 2 +- src/main/java/org/chorem/jtimer/entities/TimerTaskHelper.java | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/chorem/jtimer/JTimerConfig.java b/src/main/java/org/chorem/jtimer/JTimerConfig.java index 1a857c4..cf70f92 100644 --- a/src/main/java/org/chorem/jtimer/JTimerConfig.java +++ b/src/main/java/org/chorem/jtimer/JTimerConfig.java @@ -299,7 +299,7 @@ public class JTimerConfig { IO_SAVER_AUTOSAVEDELAY("jtimer.io.saver.autosavedelay", "300"), IO_SYNC_CLASS("jtimer.io.synchronizer.class", "org.chorem.jtimer.io.TimerTaskSynchronizer"), - IO_SYNC_AUTOSYNCDELAY("jtimer.io.synchronizer.autosyncdelay", "10"), + IO_SYNC_AUTOSYNCDELAY("jtimer.io.synchronizer.autosyncdelay", "3600"), IO_SYNC_TIMEZONE("jtimer.io.synchronizer.timezone", "+01:00"), UI_IDLE_TIME("jtimer.ui.idletime", "300"), diff --git a/src/main/java/org/chorem/jtimer/entities/TimerTaskHelper.java b/src/main/java/org/chorem/jtimer/entities/TimerTaskHelper.java index 3d53a15..f5e4678 100644 --- a/src/main/java/org/chorem/jtimer/entities/TimerTaskHelper.java +++ b/src/main/java/org/chorem/jtimer/entities/TimerTaskHelper.java @@ -339,6 +339,8 @@ public class TimerTaskHelper { public static List<JsonObject> taskToJSONFormat(TimerTask task, boolean withAnnotations, String timezone) { 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); List<JsonObject> resultingJSON = taskToJSONFormat(task, startDate, endDate, withAnnotations, timezone); return resultingJSON; } @@ -379,7 +381,7 @@ public class TimerTaskHelper { //as jtimer has time entries only for a day, the id of the times will be the date in yyyy-mm-dd format JsonObject periodElement = new JsonObject(); periodElement.addProperty("id", dateString); - periodElement.addProperty("startDate", dateString + timestamp + timezone); + periodElement.addProperty("startDate", dateString + timestamp); periodElement.addProperty("duration", entry.getValue()/1000); if (withAnnotations && !(getAnnotation(task, entry.getKey()).isEmpty())) { StringBuilder annotationBuilder = new StringBuilder(); @@ -399,6 +401,7 @@ public class TimerTaskHelper { jsonObjectList.add(responseJSON); } } + return jsonObjectList; } } -- 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 68a6cc994554f1341e0ddac242e95ae86668b38c Author: servantie <servantie.c@gmail.com> Date: Wed Jun 29 17:45:17 2016 +0200 corrected all the imports with * --- src/main/java/org/chorem/jtimer/JTimer.java | 5 +++- .../org/chorem/jtimer/data/DataEventListener.java | 5 +++- .../chorem/jtimer/entities/TimerTaskHelper.java | 13 +++++++++- .../chorem/jtimer/io/TimerTaskSynchronizer.java | 15 ++++++++--- .../jtimer/ui/report/TimerTaskUpdaterView.java | 30 +++++++++++++++++++--- .../jtimer/io/GTimerIncrementalSaverTest.java | 13 ++++++++-- 6 files changed, 69 insertions(+), 12 deletions(-) diff --git a/src/main/java/org/chorem/jtimer/JTimer.java b/src/main/java/org/chorem/jtimer/JTimer.java index c6c5089..3f4a2fb 100644 --- a/src/main/java/org/chorem/jtimer/JTimer.java +++ b/src/main/java/org/chorem/jtimer/JTimer.java @@ -66,7 +66,10 @@ import org.chorem.jtimer.data.DataViolationException; import org.chorem.jtimer.data.TimerCore; import org.chorem.jtimer.entities.TimerProject; import org.chorem.jtimer.entities.TimerTask; -import org.chorem.jtimer.ui.*; +import org.chorem.jtimer.ui.HelpFrame; +import org.chorem.jtimer.ui.NewTaskView; +import org.chorem.jtimer.ui.StatusBar; +import org.chorem.jtimer.ui.TimerTaskEditor; import org.chorem.jtimer.ui.alert.AlertEditor; import org.chorem.jtimer.ui.report.ReportView; import org.chorem.jtimer.ui.report.TimerTaskUpdaterView; diff --git a/src/main/java/org/chorem/jtimer/data/DataEventListener.java b/src/main/java/org/chorem/jtimer/data/DataEventListener.java index f51ec8e..19f19be 100644 --- a/src/main/java/org/chorem/jtimer/data/DataEventListener.java +++ b/src/main/java/org/chorem/jtimer/data/DataEventListener.java @@ -22,8 +22,11 @@ package org.chorem.jtimer.data; -import java.util.*; +import java.util.Collection; +import java.util.Date; +import java.util.EventListener; +import java.util.List; import org.chorem.jtimer.entities.TimerProject; import org.chorem.jtimer.entities.TimerTask; diff --git a/src/main/java/org/chorem/jtimer/entities/TimerTaskHelper.java b/src/main/java/org/chorem/jtimer/entities/TimerTaskHelper.java index f5e4678..fa619a9 100644 --- a/src/main/java/org/chorem/jtimer/entities/TimerTaskHelper.java +++ b/src/main/java/org/chorem/jtimer/entities/TimerTaskHelper.java @@ -27,7 +27,18 @@ import com.google.gson.JsonObject; import java.time.LocalDate; import java.time.ZoneId; -import java.util.*; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Collection; +import java.util.Collections; +import java.util.Comparator; +import java.util.Date; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.SortedMap; +import java.util.TreeMap; + /** * Helper to remove process code from entity diff --git a/src/main/java/org/chorem/jtimer/io/TimerTaskSynchronizer.java b/src/main/java/org/chorem/jtimer/io/TimerTaskSynchronizer.java index 61ceb0c..97b77e5 100644 --- a/src/main/java/org/chorem/jtimer/io/TimerTaskSynchronizer.java +++ b/src/main/java/org/chorem/jtimer/io/TimerTaskSynchronizer.java @@ -1,6 +1,12 @@ package org.chorem.jtimer.io; import com.google.gson.JsonObject; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.Date; +import java.util.List; +import java.util.Timer; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.chorem.jtimer.data.DataEventListener; @@ -8,10 +14,13 @@ import org.chorem.jtimer.entities.TimerProject; import org.chorem.jtimer.entities.TimerTask; import org.chorem.jtimer.entities.TimerTaskHelper; -import java.io.*; -import java.net.*; +import java.io.IOException; +import java.io.UnsupportedEncodingException; +import java.net.HttpURLConnection; +import java.net.MalformedURLException; +import java.net.ProtocolException; +import java.net.URL; import java.time.LocalDateTime; -import java.util.*; /** * 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 01a945f..929c530 100644 --- a/src/main/java/org/chorem/jtimer/ui/report/TimerTaskUpdaterView.java +++ b/src/main/java/org/chorem/jtimer/ui/report/TimerTaskUpdaterView.java @@ -25,6 +25,7 @@ package org.chorem.jtimer.ui.report; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.JsonObject; + import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.chorem.jtimer.JTimer; @@ -32,24 +33,45 @@ import org.chorem.jtimer.data.TimerCore; import org.chorem.jtimer.entities.SyncInfo; import org.chorem.jtimer.entities.TimerTask; import org.chorem.jtimer.io.TimerTaskSynchronizer; -import org.jdesktop.application.*; import org.jdesktop.application.Action; +import org.jdesktop.application.Application; +import org.jdesktop.application.FrameView; import org.jdesktop.swingx.JXDatePicker; import org.jdesktop.swingx.JXTaskPane; import org.jdesktop.swingx.JXTaskPaneContainer; -import javax.swing.*; +import javax.swing.BorderFactory; +import javax.swing.JButton; +import javax.swing.JCheckBox; +import javax.swing.JComboBox; +import javax.swing.JComponent; +import javax.swing.JLabel; +import javax.swing.JOptionPane; +import javax.swing.JPanel; +import javax.swing.JScrollPane; +import javax.swing.JSplitPane; +import javax.swing.JTextArea; import javax.swing.event.DocumentEvent; import javax.swing.event.DocumentListener; -import java.awt.*; + +import java.awt.Color; +import java.awt.Dimension; +import java.awt.Font; +import java.awt.GridBagConstraints; +import java.awt.GridBagLayout; +import java.awt.GridLayout; +import java.awt.Insets; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.ItemEvent; import java.awt.event.ItemListener; + import java.text.DateFormat; import java.time.LocalDate; import java.time.LocalDateTime; -import java.util.*; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Date; import java.util.List; import static org.chorem.jtimer.entities.TimerTaskHelper.taskToJSONFormat; diff --git a/src/test/java/org/chorem/jtimer/io/GTimerIncrementalSaverTest.java b/src/test/java/org/chorem/jtimer/io/GTimerIncrementalSaverTest.java index ac99865..44f5241 100644 --- a/src/test/java/org/chorem/jtimer/io/GTimerIncrementalSaverTest.java +++ b/src/test/java/org/chorem/jtimer/io/GTimerIncrementalSaverTest.java @@ -24,11 +24,20 @@ package org.chorem.jtimer.io; import java.io.File; import java.io.IOException; -import java.util.*; +import java.util.Calendar; +import java.util.Collection; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; +import java.util.SortedMap; +import java.util.TreeMap; import org.chorem.jtimer.AbstractJTimerTest; -import org.chorem.jtimer.entities.*; +import org.chorem.jtimer.entities.SyncInfo; +import org.chorem.jtimer.entities.TimerAlert; +import org.chorem.jtimer.entities.TimerProject; import org.chorem.jtimer.entities.TimerTask; +import org.chorem.jtimer.entities.TimerTaskHelper; import org.testng.Assert; import org.testng.annotations.Test; -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm