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 acf7e13705191f57ee7f9996928f288193143645 Author: servantie <servantie.c@gmail.com> Date: Thu Jun 9 15:15:58 2016 +0200 removed timezone display in TimerTaskUpdaterView (useless) --- .../java/org/chorem/jtimer/io/TimerTaskSynchronizer.java | 6 ++---- .../org/chorem/jtimer/ui/report/TimerTaskUpdaterView.java | 14 ++------------ .../ui/report/resources/TimerTaskUpdaterView.properties | 1 - .../ui/report/resources/TimerTaskUpdaterView_fr.properties | 1 - 4 files changed, 4 insertions(+), 18 deletions(-) diff --git a/src/main/java/org/chorem/jtimer/io/TimerTaskSynchronizer.java b/src/main/java/org/chorem/jtimer/io/TimerTaskSynchronizer.java index b0ea2d0..37c685f 100644 --- a/src/main/java/org/chorem/jtimer/io/TimerTaskSynchronizer.java +++ b/src/main/java/org/chorem/jtimer/io/TimerTaskSynchronizer.java @@ -146,11 +146,11 @@ public class TimerTaskSynchronizer implements DataEventListener { connection.setUseCaches(false); connection.setDoInput(true); connection.setDoOutput(true); - connection.setRequestProperty("Content-Length", "" + Integer.toString(updateJsonString.length())); + connection.setRequestProperty("Content-Length", Integer.toString(updateJsonString.length())); connection.setRequestProperty("Accept-Charset", charset); connection.setRequestProperty("Content-Type", "application/json"); connection.setRequestMethod("POST"); - postDataBytes = updateJsonString.getBytes("UTF-8"); + postDataBytes = updateJsonString.getBytes(charset); connection.getOutputStream().write(postDataBytes); //get the header fields Map<String, List<String>> map = connection.getHeaderFields(); @@ -165,14 +165,12 @@ public class TimerTaskSynchronizer implements DataEventListener { } } catch (MalformedURLException e) { log.error("URL malformed"); - //abort synchronization of this task if the url is wrong } catch (ProtocolException e) { log.error("Protocol error."); } catch (UnsupportedEncodingException e) { log.error("Problem with encoding"); } catch (IOException e) { log.error("Problem with the connection"); - //abort synchronization of this task if connection impossible } return hasUpdated; } 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 26a48ac..d98fcb9 100644 --- a/src/main/java/org/chorem/jtimer/ui/report/TimerTaskUpdaterView.java +++ b/src/main/java/org/chorem/jtimer/ui/report/TimerTaskUpdaterView.java @@ -102,7 +102,6 @@ public class TimerTaskUpdaterView extends FrameView implements DocumentListener this.task = task; timezone = "+0100"; setComponent(getMainComponent()); - //default the timezone updateJson = new ArrayList<>(); @@ -197,14 +196,6 @@ public class TimerTaskUpdaterView extends FrameView implements DocumentListener GridBagConstraints.WEST, GridBagConstraints.VERTICAL, new Insets(1, 2, 1, 1), 0, 0)); } - //display of the timezone - JLabel timezoneLabel = new JLabel(getResourceMap().getString("timezone")); - JLabel timezoneText = new JLabel(this.timezone); - panelOption.add(timezoneLabel, new GridBagConstraints(1,3,1,2,0,0, - GridBagConstraints.WEST, GridBagConstraints.VERTICAL, new Insets(2,1,1,1),0,0)); - panelOption.add(timezoneText, new GridBagConstraints(2,3,1,2,0,0, - GridBagConstraints.WEST, GridBagConstraints.VERTICAL, new Insets(1,2,1,1),0,0)); - configComponent.add(panelGeneral); configComponent.add(panelOption); @@ -408,7 +399,6 @@ public class TimerTaskUpdaterView extends FrameView implements DocumentListener } } - /** * Sends the update of a task to one url * @param task task to update @@ -428,11 +418,11 @@ public class TimerTaskUpdaterView extends FrameView implements DocumentListener connection.setUseCaches(false); connection.setDoInput(true); connection.setDoOutput(true); - connection.setRequestProperty("Content-Length", "" + Integer.toString(updateJsonString.length())); + connection.setRequestProperty("Content-Length", Integer.toString(updateJsonString.length())); connection.setRequestProperty("Accept-Charset", charset); connection.setRequestProperty("Content-Type", "application/json"); connection.setRequestMethod("POST"); - postDataBytes = updateJsonString.getBytes("UTF-8"); + postDataBytes = updateJsonString.getBytes(charset); connection.getOutputStream().write(postDataBytes); //get the header fields Map<String, List<String>> map = connection.getHeaderFields(); diff --git a/src/main/resources/org/chorem/jtimer/ui/report/resources/TimerTaskUpdaterView.properties b/src/main/resources/org/chorem/jtimer/ui/report/resources/TimerTaskUpdaterView.properties index 09a82f9..ddeae17 100644 --- a/src/main/resources/org/chorem/jtimer/ui/report/resources/TimerTaskUpdaterView.properties +++ b/src/main/resources/org/chorem/jtimer/ui/report/resources/TimerTaskUpdaterView.properties @@ -26,7 +26,6 @@ updateFrom=From : updateTo=To : lastUpdateLabel=Last Sync at: -timezone= Timezone: pickCurrentMonth.Action.text = Select current month diff --git a/src/main/resources/org/chorem/jtimer/ui/report/resources/TimerTaskUpdaterView_fr.properties b/src/main/resources/org/chorem/jtimer/ui/report/resources/TimerTaskUpdaterView_fr.properties index 4a9a20a..908ccad 100644 --- a/src/main/resources/org/chorem/jtimer/ui/report/resources/TimerTaskUpdaterView_fr.properties +++ b/src/main/resources/org/chorem/jtimer/ui/report/resources/TimerTaskUpdaterView_fr.properties @@ -27,7 +27,6 @@ updateFrom=De : updateTo=\u00C0 : lastUpdateLabel=Derni\u00E8re synchronisation : -timezone= Timezone : pickCurrentMonth.Action.text = Selectionner le mois courant -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.