summaryrefslogtreecommitdiffstats
path: root/auth/auth-locate
diff options
context:
space:
mode:
authorInstrumental <jonathan.gathman@att.com>2018-07-03 07:51:17 -0500
committerInstrumental <jonathan.gathman@att.com>2018-07-03 12:06:59 -0500
commitf85f0889b3b0e5e9694afab4dd01a4a97a155188 (patch)
tree4a7119cfa0a112e514f50bbc2961981c3670ea03 /auth/auth-locate
parent8efa968683ef2c4ab0ae7f4c0d2ccb0fcaa8af7b (diff)
Collection syntax change because of Sonar
Issue-ID: AAF-386 Change-Id: I8ba8d8561d03e680ddc90a81b8db0339814c65fa Signed-off-by: Instrumental <jonathan.gathman@att.com>
Diffstat (limited to 'auth/auth-locate')
-rw-r--r--auth/auth-locate/src/main/java/org/onap/aaf/auth/locate/facade/LocateFacadeImpl.java2
-rw-r--r--auth/auth-locate/src/test/java/org/onap/aaf/auth/locate/service/JU_LocateServiceImplTest.java2
-rw-r--r--auth/auth-locate/src/test/java/org/onap/aaf/auth/locate/validation/JU_LocateValidatorTest.java16
3 files changed, 10 insertions, 10 deletions
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<IN,OUT,ENDPOINTS,MGMT_ENDPOINTS,CONFIGURA
private static long cacheClear = 0L, emptyCheck=0L;
- private final static Map<String,String> epsCache = new HashMap<String, String>(); // protected manually, in getEndpoints
+ private final static Map<String,String> epsCache = new HashMap<>(); // protected manually, in getEndpoints
public LocateFacadeImpl(AuthzEnv env, LocateService<IN,OUT,ENDPOINTS,MGMT_ENDPOINTS,CONFIGURATION,ERROR> 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<MgmtEndpoint> mgmtEndPoints = new ArrayList<MgmtEndpoint>();
+ List<MgmtEndpoint> 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<String> subProtocol = new ArrayList<String>();
+ List<String> 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<String> subprotocol = new ArrayList<String>();
+ List<String> subprotocol = new ArrayList<>();
when(endpoint.getSubprotocol()).thenReturn(subprotocol);
- List<Endpoint> endpointList = new ArrayList<Endpoint>();
+ List<Endpoint> 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> specialPorts = new ArrayList<SpecialPorts>();
+ List<SpecialPorts> specialPorts = new ArrayList<>();
specialPorts.add(null);
when(mgmtEndpoint.getSpecialPorts()).thenReturn(specialPorts);
- List<MgmtEndpoint> mgmtEndpoints = new ArrayList<MgmtEndpoint>();
+ List<MgmtEndpoint> 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> specialPorts = new ArrayList<SpecialPorts>();
+ List<SpecialPorts> specialPorts = new ArrayList<>();
specialPorts.add(specialPort);
when(specialPort.getName()).thenReturn("Port1");
when(specialPort.getProtocol()).thenReturn("HTTP");
when(specialPort.getPort()).thenReturn(9090);
- List<String> versions = new ArrayList<String>();
+ List<String> versions = new ArrayList<>();
versions.add("1");
when(specialPort.getProtocolVersions()).thenReturn(versions);
when(mgmtEndpoint.getSpecialPorts()).thenReturn(specialPorts);
- List<MgmtEndpoint> mgmtEndpoints = new ArrayList<MgmtEndpoint>();
+ List<MgmtEndpoint> mgmtEndpoints = new ArrayList<>();
mgmtEndpoints.add(mgmtEndpoint);
when(me.getMgmtEndpoint()).thenReturn(mgmtEndpoints);