From c2af4952fe859d34ad73e86d6643862fd83e5cb8 Mon Sep 17 00:00:00 2001 From: Sumapriya Sarvepalli Date: Thu, 26 Jul 2018 11:40:14 +0530 Subject: Sonar major issues Replace with the diamond operator Sonar Link: https://sonar.onap.org/project/issues?id=org.onap.so%3Aso&open=AWSynF0AwGn37JfbvuI9&resolved=false&rules=squid%3AS2293 Location: src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/service/ServicePluginFactory.java Line: L216 L218 L220 L223 L265 L281 L294 Change-Id: I413e046f87435b6b5225a2202f03ab2c3232e807 Issue-ID: SO-757 Signed-off-by: Sumapriya Sarvepalli --- .../workflow/service/ServicePluginFactory.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'bpmn/MSOInfrastructureBPMN') diff --git a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/service/ServicePluginFactory.java b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/service/ServicePluginFactory.java index 344d8cd4fa..96768bace8 100644 --- a/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/service/ServicePluginFactory.java +++ b/bpmn/MSOInfrastructureBPMN/src/main/java/org/openecomp/mso/bpmn/infrastructure/workflow/service/ServicePluginFactory.java @@ -213,14 +213,14 @@ public class ServicePluginFactory { } private List queryTerminalPointsFromServiceProviderSystem(String srcLocation, String dstLocation) { - Map locationSrc = new HashMap(); + Map locationSrc = new HashMap<>(); locationSrc.put("location", srcLocation); - Map locationDst = new HashMap(); + Map locationDst = new HashMap<>(); locationDst.put("location", dstLocation); - List> locations = new ArrayList>(); + List> locations = new ArrayList<>(); locations.add(locationSrc); locations.add(locationDst); - List returnList = new ArrayList(); + List returnList = new ArrayList<>(); String reqContent = getJsonString(locations); String url = getThirdSPEndPoint(); String responseContent = sendRequest(url, "POST", reqContent); @@ -262,7 +262,7 @@ public class ServicePluginFactory { Map serviceObject = (Map) uuiObject.get("service"); Map serviceParametersObject = (Map) serviceObject.get("parameters"); Map serviceRequestInputs = (Map) serviceParametersObject.get("requestInputs"); - Map oofQueryObject = new HashMap(); + Map oofQueryObject = new HashMap<>(); List resources = (List) serviceParametersObject.get("resources"); oofQueryObject.put("src-access-provider-id", serviceRequestInputs.get("inner-src-access-provider-id")); oofQueryObject.put("src-access-client-id", serviceRequestInputs.get("inner-src-access-client-id")); @@ -278,7 +278,7 @@ public class ServicePluginFactory { String url = getOOFCalcEndPoint(); String responseContent = sendRequest(url, "POST", oofRequestReq); - List returnList = new ArrayList(); + List returnList = new ArrayList<>(); if (null != responseContent) { returnList = getJsonObject(responseContent, List.class); } @@ -291,7 +291,7 @@ public class ServicePluginFactory { } private Map getReturnRoute(List returnList){ - Map returnRoute = new HashMap(); + Map returnRoute = new HashMap<>(); for(Object returnVpn :returnList){ Map returnVpnInfo = (Map) returnVpn; String accessTopoId = (String)returnVpnInfo.get("access-topology-id"); -- cgit 1.2.3-korg