Fixed sonar issues in MusicHealthCheck.java 76/90976/1
authorArundathi Patil <arundpil@in.ibm.com>
Fri, 5 Jul 2019 17:31:20 +0000 (23:01 +0530)
committerArundathi Patil <arundpil@in.ibm.com>
Fri, 5 Jul 2019 17:31:34 +0000 (23:01 +0530)
Fixed multiple sonar issues across this file

Issue-ID: MUSIC-428
Change-Id: I9e6843226bc3544411334af7070e5c67f072e159
Signed-off-by: Arundathi Patil <arundpil@in.ibm.com>
src/main/java/org/onap/music/eelf/healthcheck/MusicHealthCheck.java

index cf4b2bc..fbfc0de 100644 (file)
@@ -32,7 +32,6 @@ import org.onap.music.eelf.logging.EELFLoggerDelegate;
 import org.onap.music.eelf.logging.format.AppMessages;
 import org.onap.music.eelf.logging.format.ErrorSeverity;
 import org.onap.music.eelf.logging.format.ErrorTypes;
-import org.onap.music.exceptions.MusicLockingException;
 import org.onap.music.exceptions.MusicQueryException;
 import org.onap.music.exceptions.MusicServiceException;
 import org.onap.music.main.MusicUtil;
@@ -68,7 +67,7 @@ public class MusicHealthCheck {
                         result = getAdminKeySpace(consistency, randomUUID);
                     }
                 } catch (MusicServiceException e1) {
-                    logger.error(EELFLoggerDelegate.errorLogger, e1.getMessage(), AppMessages.UNKNOWNERROR, ErrorSeverity.ERROR, ErrorTypes.UNKNOWN);
+                    logger.error(EELFLoggerDelegate.errorLogger, e1.getMessage(), AppMessages.UNKNOWNERROR, ErrorSeverity.ERROR, ErrorTypes.UNKNOWN, e1);
                 } catch (MusicQueryException e1) {
                     logger.error(EELFLoggerDelegate.errorLogger, e1.getMessage(), AppMessages.UNKNOWNERROR, ErrorSeverity.ERROR, ErrorTypes.UNKNOWN,e1);
                 }
@@ -80,7 +79,6 @@ public class MusicHealthCheck {
         try {
                        cleanHealthCheckId(randomUUID);
                } catch (MusicServiceException | MusicQueryException e) {
-                       // TODO Auto-generated catch block
                        logger.error("Error while cleaning healthcheck record id...", e);
                }
         if (result) {