From f85f0889b3b0e5e9694afab4dd01a4a97a155188 Mon Sep 17 00:00:00 2001 From: Instrumental Date: Tue, 3 Jul 2018 07:51:17 -0500 Subject: Collection syntax change because of Sonar Issue-ID: AAF-386 Change-Id: I8ba8d8561d03e680ddc90a81b8db0339814c65fa Signed-off-by: Instrumental --- .../onap/aaf/auth/locate/facade/LocateFacadeImpl.java | 2 +- .../auth/locate/service/JU_LocateServiceImplTest.java | 2 +- .../auth/locate/validation/JU_LocateValidatorTest.java | 16 ++++++++-------- 3 files changed, 10 insertions(+), 10 deletions(-) (limited to 'auth/auth-locate') diff --git a/auth/auth-locate/src/main/java/org/onap/aaf/auth/locate/facade/LocateFacadeImpl.java b/auth/auth-locate/src/main/java/org/onap/aaf/auth/locate/facade/LocateFacadeImpl.java index f7b9c363..f655657b 100644 --- a/auth/auth-locate/src/main/java/org/onap/aaf/auth/locate/facade/LocateFacadeImpl.java +++ b/auth/auth-locate/src/main/java/org/onap/aaf/auth/locate/facade/LocateFacadeImpl.java @@ -95,7 +95,7 @@ public abstract class LocateFacadeImpl epsCache = new HashMap(); // protected manually, in getEndpoints + private final static Map epsCache = new HashMap<>(); // protected manually, in getEndpoints public LocateFacadeImpl(AuthzEnv env, LocateService service, Data.TYPE dataType) throws APIException { this.service = service; diff --git a/auth/auth-locate/src/test/java/org/onap/aaf/auth/locate/service/JU_LocateServiceImplTest.java b/auth/auth-locate/src/test/java/org/onap/aaf/auth/locate/service/JU_LocateServiceImplTest.java index c79e9cbd..c66de60b 100644 --- a/auth/auth-locate/src/test/java/org/onap/aaf/auth/locate/service/JU_LocateServiceImplTest.java +++ b/auth/auth-locate/src/test/java/org/onap/aaf/auth/locate/service/JU_LocateServiceImplTest.java @@ -90,7 +90,7 @@ public class JU_LocateServiceImplTest { assertEquals(endPointResult, output); - List mgmtEndPoints = new ArrayList(); + List mgmtEndPoints = new ArrayList<>(); mgmtEndPoints.add(mgmtEndPoint); when(mgmtEndPoint.getName()).thenReturn("http.Endpoint1"); diff --git a/auth/auth-locate/src/test/java/org/onap/aaf/auth/locate/validation/JU_LocateValidatorTest.java b/auth/auth-locate/src/test/java/org/onap/aaf/auth/locate/validation/JU_LocateValidatorTest.java index 80248d2f..0339f318 100644 --- a/auth/auth-locate/src/test/java/org/onap/aaf/auth/locate/validation/JU_LocateValidatorTest.java +++ b/auth/auth-locate/src/test/java/org/onap/aaf/auth/locate/validation/JU_LocateValidatorTest.java @@ -83,7 +83,7 @@ public class JU_LocateValidatorTest { public void testSubProtoCol() { LocateValidator validator = new LocateValidator(); - List subProtocol = new ArrayList(); + List subProtocol = new ArrayList<>(); subProtocol.add(null); when(endpoint.getName()).thenReturn("EndPoint.Endpoint1"); @@ -127,20 +127,20 @@ public class JU_LocateValidatorTest { when(endpoint.getHostname()).thenReturn("HOST1"); when(endpoint.getPort()).thenReturn(9090); when(endpoint.getProtocol()).thenReturn("HTTP"); - List subprotocol = new ArrayList(); + List subprotocol = new ArrayList<>(); when(endpoint.getSubprotocol()).thenReturn(subprotocol); - List endpointList = new ArrayList(); + List endpointList = new ArrayList<>(); endpointList.add(endpoint); when(mgmtEndpoint.getName()).thenReturn("EndPoint.Endpoint1"); when(mgmtEndpoint.getHostname()).thenReturn("HOST1"); when(mgmtEndpoint.getPort()).thenReturn(9090); when(mgmtEndpoint.getProtocol()).thenReturn("HTTP"); - List specialPorts = new ArrayList(); + List specialPorts = new ArrayList<>(); specialPorts.add(null); when(mgmtEndpoint.getSpecialPorts()).thenReturn(specialPorts); - List mgmtEndpoints = new ArrayList(); + List mgmtEndpoints = new ArrayList<>(); mgmtEndpoints.add(mgmtEndpoint); when(endpoints.getEndpoint()).thenReturn(endpointList); @@ -160,20 +160,20 @@ public class JU_LocateValidatorTest { when(mgmtEndpoint.getPort()).thenReturn(9090); when(mgmtEndpoint.getProtocol()).thenReturn("HTTP"); - List specialPorts = new ArrayList(); + List specialPorts = new ArrayList<>(); specialPorts.add(specialPort); when(specialPort.getName()).thenReturn("Port1"); when(specialPort.getProtocol()).thenReturn("HTTP"); when(specialPort.getPort()).thenReturn(9090); - List versions = new ArrayList(); + List versions = new ArrayList<>(); versions.add("1"); when(specialPort.getProtocolVersions()).thenReturn(versions); when(mgmtEndpoint.getSpecialPorts()).thenReturn(specialPorts); - List mgmtEndpoints = new ArrayList(); + List mgmtEndpoints = new ArrayList<>(); mgmtEndpoints.add(mgmtEndpoint); when(me.getMgmtEndpoint()).thenReturn(mgmtEndpoints); -- cgit 1.2.3-korg