From be3181d533ea30174e0b187d43f4969505c71138 Mon Sep 17 00:00:00 2001 From: SP00501638 Date: Mon, 12 Mar 2018 17:05:16 +0530 Subject: [PATCH] Sonar Major Move the api string literal on the left side of this string comparison XACMLPapServlet.java:L1179 Sonar Link: https://sonar.onap.org/issues?myIssues=true&open=AV2blOo25bp_wwmIUQnh&resolved=false&severities=MAJOR Location: ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/XACMLPapServlet.java Line Number:1179 Change-Id: I937caaca01107d2a11be4050ff7be5e5dc66acb6 Issue-ID: POLICY-690 Signed-off-by: SP00501638 --- .../src/main/java/org/onap/policy/pap/xacml/rest/XACMLPapServlet.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/XACMLPapServlet.java b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/XACMLPapServlet.java index 650713c1e..84cd72fe6 100644 --- a/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/XACMLPapServlet.java +++ b/ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/XACMLPapServlet.java @@ -1176,7 +1176,7 @@ public class XACMLPapServlet extends HttpServlet implements StdItemSetChangeList PolicyLogger.audit("Transaction Ended Successfully"); im.endTransaction(); return; - } else if (apiflag != null && apiflag.equalsIgnoreCase("api")) { + } else if (apiflag != null && "api".equalsIgnoreCase(apiflag)) { // this request is from the Policy Creation API if(authorizeRequest(request)){ APIRequestHandler apiRequestHandler = new APIRequestHandler(); -- 2.16.6