branch feature/sync updated (19655c6 -> 6eae5ab)
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 19655c6 corrected firstdayofweek new 6eae5ab removed a useless toString(), removed unused imports 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 6eae5abd86da12bb24199d7a4eb7b981cc8eaac1 Author: servantie <servantie.c@gmail.com> Date: Tue Jun 7 16:31:23 2016 +0200 removed a useless toString(), removed unused imports Summary of changes: src/main/java/org/chorem/jtimer/JTimerConfig.java | 2 +- .../chorem/jtimer/entities/TimerTaskHelper.java | 8 ------ .../chorem/jtimer/io/TimerTaskSynchronizer.java | 31 +++++++++++++--------- .../jtimer/ui/report/TimerTaskUpdaterView.java | 1 - .../org/chorem/jtimer/ui/tasks/IdleDialog.java | 1 - .../jtimer/ui/treetable/ProjectsAndTasksTable.java | 2 -- 6 files changed, 19 insertions(+), 26 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 6eae5abd86da12bb24199d7a4eb7b981cc8eaac1 Author: servantie <servantie.c@gmail.com> Date: Tue Jun 7 16:31:23 2016 +0200 removed a useless toString(), removed unused imports --- src/main/java/org/chorem/jtimer/JTimerConfig.java | 2 +- .../chorem/jtimer/entities/TimerTaskHelper.java | 8 ------ .../chorem/jtimer/io/TimerTaskSynchronizer.java | 31 +++++++++++++--------- .../jtimer/ui/report/TimerTaskUpdaterView.java | 1 - .../org/chorem/jtimer/ui/tasks/IdleDialog.java | 1 - .../jtimer/ui/treetable/ProjectsAndTasksTable.java | 2 -- 6 files changed, 19 insertions(+), 26 deletions(-) diff --git a/src/main/java/org/chorem/jtimer/JTimerConfig.java b/src/main/java/org/chorem/jtimer/JTimerConfig.java index 5e41240..9ea5497 100644 --- a/src/main/java/org/chorem/jtimer/JTimerConfig.java +++ b/src/main/java/org/chorem/jtimer/JTimerConfig.java @@ -300,7 +300,7 @@ public class JTimerConfig { IO_SYNC_CLASS("jtimer.io.synchronizer.class", "org.chorem.jtimer.io.TimerTaskSynchronizer"), IO_SYNC_AUTOSYNCDELAY("jtimer.io.synchronizer.autosyncdelay", "10"), - IO_SYNC_TIMEZONE("jtimer.io.synchronizer.timezone", "+0600"), + IO_SYNC_TIMEZONE("jtimer.io.synchronizer.timezone", "+0100"), UI_IDLE_TIME("jtimer.ui.idletime", "300"), UI_SHOW_CLOSED("jtimer.ui.showclosed", "false"), diff --git a/src/main/java/org/chorem/jtimer/entities/TimerTaskHelper.java b/src/main/java/org/chorem/jtimer/entities/TimerTaskHelper.java index a640223..5fbd16a 100644 --- a/src/main/java/org/chorem/jtimer/entities/TimerTaskHelper.java +++ b/src/main/java/org/chorem/jtimer/entities/TimerTaskHelper.java @@ -25,15 +25,7 @@ package org.chorem.jtimer.entities; import com.google.gson.JsonArray; import com.google.gson.JsonObject; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.io.UnsupportedEncodingException; -import java.net.URL; -import java.net.URLConnection; -import java.net.URLEncoder; import java.time.LocalDate; -import java.time.LocalDateTime; import java.time.ZoneId; import java.util.*; diff --git a/src/main/java/org/chorem/jtimer/io/TimerTaskSynchronizer.java b/src/main/java/org/chorem/jtimer/io/TimerTaskSynchronizer.java index 2099d68..425c1f4 100644 --- a/src/main/java/org/chorem/jtimer/io/TimerTaskSynchronizer.java +++ b/src/main/java/org/chorem/jtimer/io/TimerTaskSynchronizer.java @@ -3,7 +3,6 @@ package org.chorem.jtimer.io; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.chorem.jtimer.data.DataEventListener; -import org.chorem.jtimer.data.TimerCore; import org.chorem.jtimer.entities.TimerProject; import org.chorem.jtimer.entities.TimerTask; import org.chorem.jtimer.entities.TimerTaskHelper; @@ -12,7 +11,6 @@ import java.io.*; import java.net.*; import java.time.LocalDateTime; import java.util.*; -import java.util.Timer; /** * @@ -148,7 +146,7 @@ public class TimerTaskSynchronizer implements DataEventListener { } byte[] postDataBytes = new byte[0]; try { - postDataBytes = updateJsonString.toString().getBytes("UTF-8"); + postDataBytes = updateJsonString.getBytes("UTF-8"); } catch (UnsupportedEncodingException e) { e.printStackTrace(); } @@ -203,8 +201,8 @@ public class TimerTaskSynchronizer implements DataEventListener { //when a task is modified, add it to the to sync list (if it isn't already there) if(!tasksToSync.contains(task) && (!tasksToSync.isEmpty())) { //add it only if the URL is not empty - if (!(task.getSynchronisingURL().isEmpty())) { - if(!(task.getSynchronisingURL().equals(null))) { + if (task.getSynchronisingURL() != null) { + if (task.getSynchronisingURL().isEmpty()){ tasksToSync.add(task); } } @@ -269,11 +267,14 @@ public class TimerTaskSynchronizer implements DataEventListener { */ @Override public void stopTask(TimerTask task) { - if(!tasksToSync.contains(task)) { + if (!tasksToSync.contains(task)) { //add it only if the URL is not empty - if (!(task.getSynchronisingURL().isEmpty())) { - tasksToSync.add(task); - } } + if (task.getSynchronisingURL() != null) { + if (task.getSynchronisingURL().isEmpty()) { + tasksToSync.add(task); + } + } + } } @Override @@ -288,11 +289,15 @@ public class TimerTaskSynchronizer implements DataEventListener { */ @Override public void modifyTaskURL(TimerTask task, String newURL) { - if(!tasksToSync.contains(task)) { + if (!tasksToSync.contains(task)) { + //add it only if the URL is not empty //add it only if the URL is not empty - if (!(task.getSynchronisingURL().isEmpty())) { - tasksToSync.add(task); - } } + if (task.getSynchronisingURL() != null) { + if (task.getSynchronisingURL().isEmpty()) { + tasksToSync.add(task); + } + } + } } @Override 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 076bb88..8c980a2 100644 --- a/src/main/java/org/chorem/jtimer/ui/report/TimerTaskUpdaterView.java +++ b/src/main/java/org/chorem/jtimer/ui/report/TimerTaskUpdaterView.java @@ -41,7 +41,6 @@ import javax.swing.event.DocumentEvent; import javax.swing.event.DocumentListener; import java.awt.*; import java.io.IOException; -import java.io.OutputStream; import java.io.UnsupportedEncodingException; import java.net.*; import java.text.DateFormat; diff --git a/src/main/java/org/chorem/jtimer/ui/tasks/IdleDialog.java b/src/main/java/org/chorem/jtimer/ui/tasks/IdleDialog.java index 85671df..845016e 100644 --- a/src/main/java/org/chorem/jtimer/ui/tasks/IdleDialog.java +++ b/src/main/java/org/chorem/jtimer/ui/tasks/IdleDialog.java @@ -37,7 +37,6 @@ import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JSeparator; import javax.swing.JToggleButton; -import javax.swing.JTree; import javax.swing.SwingConstants; import javax.swing.WindowConstants; import javax.swing.tree.TreePath; diff --git a/src/main/java/org/chorem/jtimer/ui/treetable/ProjectsAndTasksTable.java b/src/main/java/org/chorem/jtimer/ui/treetable/ProjectsAndTasksTable.java index 1245a7b..6cc9a11 100644 --- a/src/main/java/org/chorem/jtimer/ui/treetable/ProjectsAndTasksTable.java +++ b/src/main/java/org/chorem/jtimer/ui/treetable/ProjectsAndTasksTable.java @@ -26,8 +26,6 @@ import java.awt.Color; import java.awt.event.ActionEvent; import java.awt.event.KeyEvent; import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; import java.util.List; import javax.swing.AbstractAction; -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
chorem.org scm