aboutsummaryrefslogtreecommitdiffstats
path: root/datarouter-prov
diff options
context:
space:
mode:
authorRonan Keogh <ronan.keogh@ericsson.com>2018-09-25 10:00:52 +0100
committerRonan Keogh <ronan.keogh@ericsson.com>2018-09-25 10:59:11 +0100
commit0a284e41c135fca61a6ab0b70deecdf2d8c48e68 (patch)
tree8767c2faf738148501349d3e69d57dac563b32c0 /datarouter-prov
parent61f221fd62846149f7ddd70306e4eb51810a3aa6 (diff)
Fix LogfileLoader vulnerabilities
Change-Id: I02b0c5907e99aa978def1dd04876d6f8e4095ee3 Signed-off-by: Ronan Keogh <ronan.keogh@ericsson.com> Issue-ID: DMAAP-775
Diffstat (limited to 'datarouter-prov')
-rw-r--r--datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/utils/LogfileLoader.java13
1 files changed, 4 insertions, 9 deletions
diff --git a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/utils/LogfileLoader.java b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/utils/LogfileLoader.java
index 110c63de..b6ad8e43 100644
--- a/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/utils/LogfileLoader.java
+++ b/datarouter-prov/src/main/java/org/onap/dmaap/datarouter/provisioning/utils/LogfileLoader.java
@@ -214,7 +214,6 @@ public class LogfileLoader extends Thread {
}
} catch (Exception e) {
logger.warn("PROV0020: Caught exception in LogfileLoader: " + e);
- e.printStackTrace();
}
}
}
@@ -275,7 +274,7 @@ public class LogfileLoader extends Thread {
}
} catch (SQLException e) {
System.err.println(e);
- e.printStackTrace();
+ logger.error(e);
} finally {
db.release(conn);
}
@@ -297,7 +296,7 @@ public class LogfileLoader extends Thread {
}
} catch (SQLException e) {
System.err.println(e);
- e.printStackTrace();
+ logger.error(e);
} finally {
db.release(conn);
}
@@ -322,7 +321,7 @@ public class LogfileLoader extends Thread {
}
} catch (SQLException e) {
System.err.println(e);
- e.printStackTrace();
+ logger.error(e);
} finally {
db.release(conn);
}
@@ -376,7 +375,7 @@ public class LogfileLoader extends Thread {
logger.debug(String.format("initializeNextid, next ID is %d (%x)", nextid, nextid));
} catch (SQLException e) {
System.err.println(e);
- e.printStackTrace();
+ logger.error(e);
} finally {
db.release(conn);
}
@@ -417,19 +416,15 @@ public class LogfileLoader extends Thread {
} catch (SQLException e) {
logger.warn("PROV8003 Invalid value in record: " + line);
logger.debug(e);
- e.printStackTrace();
} catch (NumberFormatException e) {
logger.warn("PROV8004 Invalid number in record: " + line);
logger.debug(e);
- e.printStackTrace();
} catch (ParseException e) {
logger.warn("PROV8005 Invalid date in record: " + line);
logger.debug(e);
- e.printStackTrace();
} catch (Exception e) {
logger.warn("PROV8006 Invalid pattern in record: " + line);
logger.debug(e);
- e.printStackTrace();
}
total++;
}