From: SP00501638 Date: Mon, 12 Mar 2018 11:35:16 +0000 (+0530) Subject: Sonar Major X-Git-Tag: v1.2.0~64^2 X-Git-Url: https://gerrit.onap.org/r/gitweb?p=policy%2Fengine.git;a=commitdiff_plain;h=be3181d533ea30174e0b187d43f4969505c71138 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 --- 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();