From 2c3be92eccd45ebad09d4fea7245f11a3c14f583 Mon Sep 17 00:00:00 2001 From: Munir Ahmad Date: Fri, 2 Mar 2018 19:47:30 -0500 Subject: Replace explicit type with dimond type Change-Id: I1dedb9ef1ca7b734e3cfc0a3a594d733dbd298d4 Issue-ID: SO-437 Signed-off-by: Munir Ahmad --- .../mso/apihandlerinfra/MsoRequestTest.java | 22 +++++++++++----------- .../apihandlerinfra/NetworkRequestHandlerTest.java | 2 +- .../VfModuleModelNamesHandlerTest.java | 2 +- .../mso/apihandlerinfra/VnfRequestHandlerTest.java | 4 ++-- .../mso/apihandlerinfra/VnfTypesHandlerTest.java | 2 +- .../apihandlerinfra/VolumeRequestHandlerTest.java | 2 +- 6 files changed, 17 insertions(+), 17 deletions(-) (limited to 'mso-api-handlers/mso-api-handler-infra/src/test') diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/MsoRequestTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/MsoRequestTest.java index 6a7fc2c723..c4a1c1fffc 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/MsoRequestTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/MsoRequestTest.java @@ -76,7 +76,7 @@ public class MsoRequestTest { return; } ObjectMapper mapper = new ObjectMapper(); - HashMap instanceIdMap = new HashMap(); + HashMap instanceIdMap = new HashMap<>(); instanceIdMap.put("serviceInstanceId", "3eecada1-83a4-4f33-9ed2-7937e7b8dbbc"); ServiceInstancesRequest sir = mapper.readValue(requestJSON, ServiceInstancesRequest.class); MsoRequest msoRequest = new MsoRequest ("1234"); @@ -101,7 +101,7 @@ public class MsoRequestTest { return; } ObjectMapper mapper = new ObjectMapper(); - HashMap instanceIdMap = new HashMap(); + HashMap instanceIdMap = new HashMap<>(); instanceIdMap.put("serviceInstanceId", "3eecada1-83a4-4f33-9ed2-7937e7b8dbbc"); ServiceInstancesRequest sir = mapper.readValue(requestJSON, ServiceInstancesRequest.class); MsoRequest msoRequest = new MsoRequest ("1234"); @@ -121,7 +121,7 @@ public class MsoRequestTest { return; } ObjectMapper mapper = new ObjectMapper(); - HashMap instanceIdMap = new HashMap(); + HashMap instanceIdMap = new HashMap<>(); instanceIdMap.put("serviceInstanceId", "3eecada1-83a4-4f33-9ed2-7937e7b8dbbc"); ServiceInstancesRequest sir = mapper.readValue(requestJSON, ServiceInstancesRequest.class); MsoRequest msoRequest = new MsoRequest ("1234"); @@ -141,7 +141,7 @@ public class MsoRequestTest { return; } ObjectMapper mapper = new ObjectMapper(); - HashMap instanceIdMap = new HashMap(); + HashMap instanceIdMap = new HashMap<>(); instanceIdMap.put("serviceInstanceId", "3eecada1-83a4-4f33-9ed2-7937e7b8dbbc"); ServiceInstancesRequest sir = mapper.readValue(requestJSON, ServiceInstancesRequest.class); MsoRequest msoRequest = new MsoRequest ("1234"); @@ -161,7 +161,7 @@ public class MsoRequestTest { return; } ObjectMapper mapper = new ObjectMapper(); - HashMap instanceIdMap = new HashMap(); + HashMap instanceIdMap = new HashMap<>(); instanceIdMap.put("serviceInstanceId", "3eecada1-83a4-4f33-9ed2-7937e7b8dbbc"); ServiceInstancesRequest sir = mapper.readValue(requestJSON, ServiceInstancesRequest.class); MsoRequest msoRequest = new MsoRequest ("1234"); @@ -181,7 +181,7 @@ public class MsoRequestTest { return; } ObjectMapper mapper = new ObjectMapper(); - HashMap instanceIdMap = new HashMap(); + HashMap instanceIdMap = new HashMap<>(); instanceIdMap.put("serviceInstanceId", "3eecada1-83a4-4f33-9ed2-7937e7b8dbbc"); ServiceInstancesRequest sir = mapper.readValue(requestJSON1, ServiceInstancesRequest.class); MsoRequest msoRequest = new MsoRequest ("1234"); @@ -210,7 +210,7 @@ public class MsoRequestTest { return; } ObjectMapper mapper = new ObjectMapper(); - HashMap instanceIdMap = new HashMap(); + HashMap instanceIdMap = new HashMap<>(); instanceIdMap.put("serviceInstanceId", "3eecada1-83a4-4f33-9ed2-7937e7b8dbbc"); ServiceInstancesRequest sir = mapper.readValue(requestJSON2, ServiceInstancesRequest.class); MsoRequest msoRequest = new MsoRequest ("1234"); @@ -230,7 +230,7 @@ public class MsoRequestTest { return; } ObjectMapper mapper = new ObjectMapper(); - HashMap instanceIdMap = new HashMap(); + HashMap instanceIdMap = new HashMap<>(); instanceIdMap.put("serviceInstanceId", "3eecada1-83a4-4f33-9ed2-7937e7b8dbbc"); ServiceInstancesRequest sir = mapper.readValue(requestJSON, ServiceInstancesRequest.class); MsoRequest msoRequest = new MsoRequest ("1234"); @@ -251,7 +251,7 @@ public class MsoRequestTest { } ObjectMapper mapper = new ObjectMapper(); - HashMap instanceIdMap = new HashMap(); + HashMap instanceIdMap = new HashMap<>(); instanceIdMap.put("serviceInstanceId", "3eecada1-83a4-4f33-9ed2-7937e7b8dbbc"); instanceIdMap.put("vnfInstanceId", "3eecada1-83a4-4f33-9ed2-7937e7b8dbbc"); ServiceInstancesRequest sir = mapper.readValue(requestJSON, ServiceInstancesRequest.class); @@ -270,7 +270,7 @@ public class MsoRequestTest { } mapper = new ObjectMapper(); - instanceIdMap = new HashMap(); + instanceIdMap = new HashMap<>(); instanceIdMap.put("serviceInstanceId", "3eecada1-83a4-4f33-9ed2-7937e7b8dbbc"); instanceIdMap.put("vnfInstanceId", "3eecada1-83a4-4f33-9ed2-7937e7b8dbbc"); sir = mapper.readValue(requestJSON, ServiceInstancesRequest.class); @@ -291,7 +291,7 @@ public class MsoRequestTest { } ObjectMapper mapper = new ObjectMapper(); - HashMap instanceIdMap = new HashMap(); + HashMap instanceIdMap = new HashMap<>(); instanceIdMap.put("serviceInstanceId", "3eecada1-83a4-4f33-9ed2-7937e7b8dbbc"); instanceIdMap.put("vnfInstanceId", "3eecada1-83a4-4f33-9ed2-7937e7b8dbbc"); ServiceInstancesRequest sir = mapper.readValue(requestJSON, ServiceInstancesRequest.class); diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/NetworkRequestHandlerTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/NetworkRequestHandlerTest.java index 89d4d0c98f..c1da76e885 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/NetworkRequestHandlerTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/NetworkRequestHandlerTest.java @@ -179,7 +179,7 @@ UriInfo uriInfo = null; public List getRequestListFromInfraActive (String queryAttributeName, String queryValue, String requestType) { - List list = new ArrayList(); + List list = new ArrayList<>(); InfraActiveRequests req = new InfraActiveRequests(); req.setAaiServiceId("299392"); req.setAction("CREATE"); diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/VfModuleModelNamesHandlerTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/VfModuleModelNamesHandlerTest.java index 4305db3e72..1c3c85653b 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/VfModuleModelNamesHandlerTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/VfModuleModelNamesHandlerTest.java @@ -49,7 +49,7 @@ public class VfModuleModelNamesHandlerTest { new MockUp() { @Mock public List getAllVfModules(){ - List list = new ArrayList(); + List list = new ArrayList<>(); VfModule resource = new VfModule(); list.add(resource); return list; diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/VnfRequestHandlerTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/VnfRequestHandlerTest.java index 205bb8d910..9c9ebaee35 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/VnfRequestHandlerTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/VnfRequestHandlerTest.java @@ -177,7 +177,7 @@ public class VnfRequestHandlerTest { public List getRequestListFromInfraActive (String queryAttributeName, String queryValue, String requestType) { - List list = new ArrayList(); + List list = new ArrayList<>(); InfraActiveRequests req = new InfraActiveRequests(); req.setAaiServiceId("299392"); req.setAction("CREATE"); @@ -202,7 +202,7 @@ public class VnfRequestHandlerTest { public List getRequestListFromInfraActive (String queryAttributeName, String queryValue, String requestType) { - List list = new ArrayList(); + List list = new ArrayList<>(); InfraActiveRequests req = new InfraActiveRequests(); req.setAaiServiceId("299392"); req.setAction("CREATE"); diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/VnfTypesHandlerTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/VnfTypesHandlerTest.java index 7eabc1ac2a..1800bb4695 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/VnfTypesHandlerTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/VnfTypesHandlerTest.java @@ -62,7 +62,7 @@ public class VnfTypesHandlerTest { new MockUp() { @Mock public List getAllVnfResources(){ - List list = new ArrayList(); + List list = new ArrayList<>(); VnfResource resource = new VnfResource(); list.add(resource); return list; diff --git a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/VolumeRequestHandlerTest.java b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/VolumeRequestHandlerTest.java index fa6b06b4b2..fa5e094336 100644 --- a/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/VolumeRequestHandlerTest.java +++ b/mso-api-handlers/mso-api-handler-infra/src/test/java/org/openecomp/mso/apihandlerinfra/VolumeRequestHandlerTest.java @@ -151,7 +151,7 @@ public class VolumeRequestHandlerTest { public List getRequestListFromInfraActive (String queryAttributeName, String queryValue, String requestType) { - List list = new ArrayList(); + List list = new ArrayList<>(); InfraActiveRequests req = new InfraActiveRequests(); req.setAaiServiceId("299392"); req.setAction("CREATE"); -- cgit 1.2.3-korg