aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorThomas Nelson <nelson24@att.com>2019-02-01 18:31:26 +0000
committerGerrit Code Review <gerrit@onap.org>2019-02-01 18:31:26 +0000
commit32bcfc2f85583d35c2abea242d7107fd72a98749 (patch)
treea8c374c1ad3e2e937819054d667254da63ebcfd6 /src
parentc5cda16ca30680ad5912f892b74b4f97f43ec189 (diff)
parent2691cfe68a314ab782f29c5b09d1efeb06aa484a (diff)
Merge "Sonar Fixes - MusicAuthentication.java"
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/onap/music/authentication/MusicAuthentication.java8
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()));
}