From 17816c11047033e24173aa7a8442cc035868c558 Mon Sep 17 00:00:00 2001 From: Ronan Keogh Date: Tue, 25 Sep 2018 11:27:42 +0100 Subject: Fix SubscriberReport vulnerabilities Change-Id: I6685c931a901d275c28a2a6c9b1edc5cf65ab5cd Signed-off-by: Ronan Keogh Issue-ID: DMAAP-775 --- .../main/java/org/onap/dmaap/datarouter/reports/SubscriberReport.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'datarouter-prov/src') diff --git a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/reports/SubscriberReport.java b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/reports/SubscriberReport.java index 51beac92..b580af77 100644 --- a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/reports/SubscriberReport.java +++ b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/reports/SubscriberReport.java @@ -144,7 +144,7 @@ public class SubscriberReport extends ReportBase { db.release(conn); } catch (SQLException e) { - e.printStackTrace(); + logger.error("SQLException: " + e.getMessage()); } logger.debug("Query time: " + (System.currentTimeMillis() - start) + " ms"); try (PrintWriter os = new PrintWriter(outfile)){ @@ -155,6 +155,7 @@ public class SubscriberReport extends ReportBase { } } catch (FileNotFoundException e) { System.err.println("File cannot be written: " + outfile); + logger.error("FileNotFoundException: " + e.getMessage()); } } } -- cgit 1.2.3-korg