aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJegadeesh Babu <jegabab1@in.ibm.com>2019-02-07 16:26:42 +0530
committerJegadeesh Babu <jegabab1@in.ibm.com>2019-02-12 13:01:34 +0000
commitd1bc89d22c15871c22725f0f0336f8e53d5b3660 (patch)
treecff49457e5a278026c44fb9ddae3efefec773571
parentdd899213724ceaab3bb141dfb5cbf4eb7b89404a (diff)
Fix for code Vulnerability,reported by Sonar
Removed and printStackTrace and added logger Issue-ID: MUSIC-314 Change-Id: Ieeb33d6e58ec469c6fb540d943bae97b703ebbda Signed-off-by: Jegadeesh Babu <jegabab1@in.ibm.com>
-rw-r--r--src/main/java/org/onap/music/eelf/healthcheck/MusicHealthCheck.java10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/main/java/org/onap/music/eelf/healthcheck/MusicHealthCheck.java b/src/main/java/org/onap/music/eelf/healthcheck/MusicHealthCheck.java
index 93c44468..3e962a02 100644
--- a/src/main/java/org/onap/music/eelf/healthcheck/MusicHealthCheck.java
+++ b/src/main/java/org/onap/music/eelf/healthcheck/MusicHealthCheck.java
@@ -3,6 +3,8 @@
* org.onap.music
* ===================================================================
* Copyright (c) 2017 AT&T Intellectual Property
+ *
+ * Modifications Copyright (C) 2019 IBM.
* ===================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -65,9 +67,7 @@ public class MusicHealthCheck {
try {
result = getAdminKeySpace(consistency);
} catch (MusicServiceException e1) {
- // TODO Auto-generated catch block
- logger.error("Error", e);
- e1.printStackTrace();
+ logger.error(EELFLoggerDelegate.errorLogger, e1.getMessage(),AppMessages.UNKNOWNERROR, ErrorSeverity.ERROR, ErrorTypes.UNKNOWN);
}
} else {
logger.error("Error", e);
@@ -106,9 +106,7 @@ public class MusicHealthCheck {
try {
rs = MusicCore.nonKeyRelatedPut(pQuery, ConsistencyLevel.ONE.toString());
} catch (MusicServiceException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- logger.error("Error", e);
+ logger.error(EELFLoggerDelegate.errorLogger, e.getMessage(),AppMessages.UNKNOWNERROR, ErrorSeverity.ERROR, ErrorTypes.UNKNOWN);
}
if(rs != null && rs.getResult().toLowerCase().contains("success"))
return true;