From a7326b3eda85d61ac314bf8a0623b8bff88a4e9d Mon Sep 17 00:00:00 2001 From: shashikanth Date: Mon, 25 Sep 2017 19:35:50 +0530 Subject: Fix major sonar issues Move the "filter" string literal on the left side of this string comparison Issue-Id:SO-118 Change-Id: Ib9078c10ffac5cb54e74e4c4565d413f4908f532 Signed-off-by: shashikanth.vh --- .../src/main/java/org/openecomp/mso/apihandlerinfra/MsoRequest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/MsoRequest.java b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/MsoRequest.java index 8ee106efc1..9b975facc6 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/MsoRequest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/main/java/org/openecomp/mso/apihandlerinfra/MsoRequest.java @@ -586,20 +586,20 @@ public class MsoRequest { public Map> getOrchestrationFilters (MultivaluedMap queryParams) throws ValidationException { String queryParam = null; - Map> orchestrationFilterParams = new HashMap>(); + Map> orchestrationFilterParams = new HashMap<>(); for (Entry> entry : queryParams.entrySet()) { queryParam = entry.getKey(); try{ - if(queryParam.equalsIgnoreCase("filter")){ + if("filter".equalsIgnoreCase(queryParam)){ for(String value : entry.getValue()) { StringTokenizer st = new StringTokenizer(value, ":"); int counter=0; String mapKey=null; - List orchestrationList = new ArrayList(); + List orchestrationList = new ArrayList<>(); while (st.hasMoreElements()) { if(counter == 0){ mapKey = st.nextElement() + ""; -- cgit 1.2.3-korg