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 d31583af21d4f1d8ac70b0f57a74894d70613206 Author: servantie <servantie.c@gmail.com> Date: Wed Jun 8 16:45:51 2016 +0200 logs instead of stacktrace --- .../org/chorem/jtimer/ui/report/TimerTaskUpdaterView.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) 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 f2653ab..4537971 100644 --- a/src/main/java/org/chorem/jtimer/ui/report/TimerTaskUpdaterView.java +++ b/src/main/java/org/chorem/jtimer/ui/report/TimerTaskUpdaterView.java @@ -89,6 +89,7 @@ public class TimerTaskUpdaterView extends FrameView implements DocumentListener * * @param application parent reference * @param core core reference + * @param task the task to update */ public TimerTaskUpdaterView(Application application, TimerCore core, TimerTask task) { @@ -420,12 +421,12 @@ public class TimerTaskUpdaterView extends FrameView implements DocumentListener try { url = new URL(syncURL); } catch (MalformedURLException e) { - e.printStackTrace(); + log.error("Malformed URL"); } try { connection = (HttpURLConnection) url.openConnection(); } catch (IOException e) { - e.printStackTrace(); + log.error("Connection error"); } connection.setUseCaches(false); @@ -437,18 +438,18 @@ public class TimerTaskUpdaterView extends FrameView implements DocumentListener try { connection.setRequestMethod("POST"); } catch (ProtocolException e) { - e.printStackTrace(); + log.error("Protocol Error"); } byte[] postDataBytes = new byte[0]; try { postDataBytes = updateJson.toString().getBytes("UTF-8"); } catch (UnsupportedEncodingException e) { - e.printStackTrace(); + log.error("Unsupported Encoding"); } try { connection.getOutputStream().write(postDataBytes); } catch (IOException e) { - e.printStackTrace(); + log.error("OutputStream error"); } //get the header fields @@ -457,7 +458,7 @@ public class TimerTaskUpdaterView extends FrameView implements DocumentListener //check for positive answer from server for (Map.Entry<String, List<String>> entry : map.entrySet()) { for (String s : entry.getValue()) { - if (s.equals("HTTP/1.1 200 OK")) { + if ("HTTP/1.1 200 OK".equals(s)) { hasUpdated = true; } } -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.