diff options
author | Driptaroop Das <driptaroop.das@in.ibm.com> | 2019-02-01 13:04:42 +0530 |
---|---|---|
committer | Driptaroop Das <driptaroop.das@in.ibm.com> | 2019-02-01 13:04:54 +0530 |
commit | 2691cfe68a314ab782f29c5b09d1efeb06aa484a (patch) | |
tree | 250fc050d3b3e1d6561d4022525caa93c3eeacaf /src | |
parent | 7a6ad9831c7009f85ad881a695529fdc0246c3a6 (diff) |
Sonar Fixes - MusicAuthentication.java
Sonar Fixes - MusicAuthentication.java
Issue-ID: MUSIC-304
Change-Id: I70518240f7c736b5301d6a1104c131328643391b
Signed-off-by: Driptaroop Das <driptaroop.das@in.ibm.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/onap/music/authentication/MusicAuthentication.java | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/main/java/org/onap/music/authentication/MusicAuthentication.java b/src/main/java/org/onap/music/authentication/MusicAuthentication.java index 0471e309..1d845b3c 100644 --- a/src/main/java/org/onap/music/authentication/MusicAuthentication.java +++ b/src/main/java/org/onap/music/authentication/MusicAuthentication.java @@ -37,7 +37,6 @@ import org.onap.music.exceptions.MusicServiceException; import org.onap.music.main.CachingUtil; import org.onap.music.main.MusicCore; import org.onap.music.main.MusicUtil; -import org.onap.music.service.impl.MusicZKCore; import com.datastax.driver.core.DataType; import com.datastax.driver.core.Row; @@ -76,6 +75,7 @@ public class MusicAuthentication { try { isAAFApp= CachingUtil.isAAFApplication(nameSpace); } catch(MusicServiceException e) { + logger.error(e.getErrorMessage(), e); resultMap.put("Exception", e.getMessage()); return resultMap; } @@ -84,7 +84,7 @@ public class MusicAuthentication { + " is correct and Application is onboarded."); return resultMap; } - boolean isAAF = Boolean.valueOf(isAAFApp); + boolean isAAF = Boolean.parseBoolean(isAAFApp); if (userId == null || password == null) { logger.error(EELFLoggerDelegate.errorLogger,"", AppMessages.MISSINGINFO ,ErrorSeverity.WARN, ErrorTypes.AUTHENTICATIONERROR); logger.error(EELFLoggerDelegate.errorLogger,"One or more required headers is missing. userId: " + userId @@ -141,7 +141,7 @@ public class MusicAuthentication { uuid = rs.getUUID("uuid").toString(); resultMap.put("uuid", "existing"); } catch (Exception e) { - logger.info(EELFLoggerDelegate.applicationLogger,"No UUID found in DB. So creating new UUID."); + logger.error(EELFLoggerDelegate.applicationLogger,"No UUID found in DB. So creating new UUID."); uuid = CachingUtil.generateUUID(); resultMap.put("uuid", "new"); } @@ -154,8 +154,6 @@ public class MusicAuthentication { public static boolean authenticateAdmin(String id,String password) { - String a = MusicUtil.getAdminId(); - String b = MusicUtil.getAdminPass(); return (id.equals(MusicUtil.getAdminId()) && password.equals(MusicUtil.getAdminPass())); } |