summaryrefslogtreecommitdiffstats
path: root/datarouter-prov/src/main/java
diff options
context:
space:
mode:
authorRam Koya <rk541m@att.com>2018-09-25 13:20:37 +0000
committerGerrit Code Review <gerrit@onap.org>2018-09-25 13:20:37 +0000
commitb6caa77386fd10d38e02322222172ef38aea1f77 (patch)
tree4a5c1cf49579e1139c985665481045f9ec9c1ee1 /datarouter-prov/src/main/java
parent54d772f35162bcce5f91f6ae82089b848b49a246 (diff)
parent0a284e41c135fca61a6ab0b70deecdf2d8c48e68 (diff)
Merge "Fix LogfileLoader vulnerabilities"
Diffstat (limited to 'datarouter-prov/src/main/java')
-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++;
}