Fix SubscriberReport vulnerabilities 23/68823/1
authorRonan Keogh <ronan.keogh@ericsson.com>
Tue, 25 Sep 2018 10:27:42 +0000 (11:27 +0100)
committerRonan Keogh <ronan.keogh@ericsson.com>
Tue, 25 Sep 2018 10:27:46 +0000 (11:27 +0100)
Change-Id: I6685c931a901d275c28a2a6c9b1edc5cf65ab5cd
Signed-off-by: Ronan Keogh <ronan.keogh@ericsson.com>
Issue-ID: DMAAP-775

datarouter-prov/src/main/java/org/onap/dmaap/datarouter/reports/SubscriberReport.java

index 51beac9..b580af7 100644 (file)
@@ -144,7 +144,7 @@ public class SubscriberReport extends ReportBase {
 \r
             db.release(conn);\r
         } catch (SQLException e) {\r
-            e.printStackTrace();\r
+            logger.error("SQLException: " + e.getMessage());\r
         }\r
         logger.debug("Query time: " + (System.currentTimeMillis() - start) + " ms");\r
         try (PrintWriter os = new PrintWriter(outfile)){\r
@@ -155,6 +155,7 @@ public class SubscriberReport extends ReportBase {
             }\r
         } catch (FileNotFoundException e) {\r
             System.err.println("File cannot be written: " + outfile);\r
+            logger.error("FileNotFoundException: " + e.getMessage());\r
         }\r
     }\r
 }\r