From ab1ce79900e9f82e0034cb444848b41bf9f6702f Mon Sep 17 00:00:00 2001 From: lukas-heiligenbrunner Date: Fri, 13 Dec 2019 11:25:41 +0100 Subject: [PATCH] * optimized Sout calls to Logs --- .../website/datarequests/AdminRequests.java | 3 ++- .../website/datarequests/DataRequest.java | 5 +---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/java/com/wasteinformationserver/website/datarequests/AdminRequests.java b/src/java/com/wasteinformationserver/website/datarequests/AdminRequests.java index 1a3262d..1a8fbeb 100644 --- a/src/java/com/wasteinformationserver/website/datarequests/AdminRequests.java +++ b/src/java/com/wasteinformationserver/website/datarequests/AdminRequests.java @@ -1,5 +1,6 @@ package com.wasteinformationserver.website.datarequests; +import com.wasteinformationserver.basicutils.Log; import com.wasteinformationserver.website.basicrequest.PostRequest; import java.io.File; @@ -27,7 +28,7 @@ public class AdminRequests extends PostRequest { /* is it a jar file? */ if (!currentJar.getName().endsWith(".jar")) - System.out.println("not jar"); + Log.warning("not jar --> cant restart"); /* Build command: java -jar application.jar */ final ArrayList command = new ArrayList(); diff --git a/src/java/com/wasteinformationserver/website/datarequests/DataRequest.java b/src/java/com/wasteinformationserver/website/datarequests/DataRequest.java index ffd825e..8705e3d 100644 --- a/src/java/com/wasteinformationserver/website/datarequests/DataRequest.java +++ b/src/java/com/wasteinformationserver/website/datarequests/DataRequest.java @@ -52,7 +52,7 @@ public class DataRequest extends PostRequest { } catch (SQLException e) { e.printStackTrace(); } - System.out.println(status); + if (status == 1) { sb.append("\"status\" : \"inserted\""); } else { @@ -64,7 +64,6 @@ public class DataRequest extends PostRequest { sb.append("\"status\" : \"exists\""); } else { //already exists - System.out.println("already exists"); sb.append("\"status\" : \"exists\""); } @@ -84,8 +83,6 @@ public class DataRequest extends PostRequest { if (!set.isLast()) { sb.append(","); } - -// System.out.println(sett.getString("name")); } } catch (SQLException e) { e.printStackTrace();