summaryrefslogtreecommitdiffstats
path: root/ONAP-PAP-REST
diff options
context:
space:
mode:
authoruj426b <uj426b@att.com>2019-04-09 15:27:45 -0400
committeruj426b <uj426b@att.com>2019-04-09 16:12:02 -0400
commit33917aa3bd7ef8ad24e58f9c966eae3be2536961 (patch)
tree467186fe5cdf6ae1dd27f41418fd538fe848428f /ONAP-PAP-REST
parent279bf7ca260e3541ec3c54dcfc269a925f676c43 (diff)
Add Additional Junit and fix Sonar new bug.
Issue-ID: POLICY-1416 Signed-off-by: uj426b <uj426b@att.com> Change-Id: Ie4e6e91d555be448caa290bce36eb58075046619 Signed-off-by: uj426b <uj426b@att.com>
Diffstat (limited to 'ONAP-PAP-REST')
-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 {