aboutsummaryrefslogtreecommitdiffstats
path: root/ONAP-PAP-REST/src
diff options
context:
space:
mode:
authorPamela Dragosh <pdragosh@research.att.com>2019-04-09 22:39:29 +0000
committerGerrit Code Review <gerrit@onap.org>2019-04-09 22:39:29 +0000
commit5ae1ce7a3ffeb37836ef97ad3da554036da780bc (patch)
treed6a3b6e75fb7cf0829aa11ff65028416e88a391e /ONAP-PAP-REST/src
parent9beb01fafe35a819d85bc66668b499f25aa0857a (diff)
parent33917aa3bd7ef8ad24e58f9c966eae3be2536961 (diff)
Merge "Add Additional Junit and fix Sonar new bug."
Diffstat (limited to 'ONAP-PAP-REST/src')
-rw-r--r--ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/handler/DictionaryHandlerImpl.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/handler/DictionaryHandlerImpl.java b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/handler/DictionaryHandlerImpl.java
index 5fd0b9169..5fc737887 100644
--- a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/handler/DictionaryHandlerImpl.java
+++ b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/handler/DictionaryHandlerImpl.java
@@ -313,7 +313,7 @@ public class DictionaryHandlerImpl implements DictionaryHandler {
response.addHeader("error", message);
return;
}
- if (result.equalsIgnoreCase("Success")) {
+ if(("Success").equalsIgnoreCase(result)) {
response.setStatus(HttpServletResponse.SC_OK);
response.addHeader("successMapKey", "success");
if (operation.equalsIgnoreCase("update")) {
@@ -321,10 +321,10 @@ public class DictionaryHandlerImpl implements DictionaryHandler {
} else {
response.addHeader("operation", "createDictionary");
}
- } else if (result.equalsIgnoreCase("Duplicate")) {
+ } else if (("Duplicate").equalsIgnoreCase(result)) {
response.setStatus(HttpServletResponse.SC_CONFLICT);
response.addHeader("error", "dictionaryItemExists");
- } else if (result.equalsIgnoreCase("DuplicateGroup")) {
+ } else if (("DuplicateGroup").equalsIgnoreCase(result)) {
response.setStatus(HttpServletResponse.SC_CONFLICT);
response.addHeader("error", "duplicateGroup");
} else {