Code Clean up: remove type from <> 38/58138/2
authormatthieu <mcauffiez@inocybe.com>
Thu, 1 Jun 2017 20:16:13 +0000 (16:16 -0400)
committerIsaku Yamahata <isaku.yamahata@gmail.com>
Mon, 12 Jun 2017 23:10:49 +0000 (23:10 +0000)
Since Java 7 is not necessary to explicit type from <>

Change-Id: Iccec01a57a0bd6d0bc19cebca153fabfa825c9ca
Signed-off-by: matthieu <mcauffiez@inocybe.com>
21 files changed:
neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronL2gateway.java
neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronPort.java
neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronSFCFlowClassifier.java
neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronSFCPortPair.java
neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronSubnet.java
neutron-spi/src/test/java/org/opendaylight/neutron/spi/JaxbTestHelper.java
neutron-spi/src/test/java/org/opendaylight/neutron/spi/NeutronLoadBalancerHealthMonitorJAXBTest.java
neutron-spi/src/test/java/org/opendaylight/neutron/spi/NeutronSubnetTest.java
northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronNorthboundRSApplication.java
northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/PaginatedRequestFactory.java
transcriber/src/main/java/org/opendaylight/neutron/transcriber/AbstractNeutronInterface.java
transcriber/src/main/java/org/opendaylight/neutron/transcriber/NeutronBgpvpnInterface.java
transcriber/src/main/java/org/opendaylight/neutron/transcriber/NeutronL2gatewayInterface.java
transcriber/src/main/java/org/opendaylight/neutron/transcriber/NeutronLoadBalancerHealthMonitorInterface.java
transcriber/src/main/java/org/opendaylight/neutron/transcriber/NeutronLoadBalancerListenerInterface.java
transcriber/src/main/java/org/opendaylight/neutron/transcriber/NeutronLoadBalancerPoolInterface.java
transcriber/src/main/java/org/opendaylight/neutron/transcriber/NeutronNetworkInterface.java
transcriber/src/main/java/org/opendaylight/neutron/transcriber/NeutronPortInterface.java
transcriber/src/main/java/org/opendaylight/neutron/transcriber/NeutronRouterInterface.java
transcriber/src/main/java/org/opendaylight/neutron/transcriber/NeutronSubnetInterface.java
transcriber/src/main/java/org/opendaylight/neutron/transcriber/NeutronVpnIpSecSiteConnectionsInterface.java

index c672c0a3b512628ad30afa285e5205cf2a6d0419..8b083894c8e14d4aee04e5dc9f2d9bed4f1165c8 100644 (file)
@@ -34,7 +34,7 @@ public final class NeutronL2gateway extends NeutronBaseAttributes<NeutronL2gatew
     protected boolean extractField(String field, NeutronL2gateway ans) {
         switch (field) {
             case "devices":
-                List<NeutronL2gatewayDevice> devices = new ArrayList<NeutronL2gatewayDevice>();
+                List<NeutronL2gatewayDevice> devices = new ArrayList<>();
                 devices.addAll(this.getNeutronL2gatewayDevices());
                 ans.setNeutronL2gatewayDevices(devices);
                 break;
index b36cbf5699e3a8bf09cf77157e01ce3bf784dfb7..f6abaafc1254271646f6506fa1379638310cb6b6 100644 (file)
@@ -210,7 +210,7 @@ public final class NeutronPort extends NeutronAdminAttributes<NeutronPort> imple
                 ans.setMacAddress(this.getMacAddress());
                 break;
             case "fixed_ips":
-                ans.setFixedIps(new ArrayList<NeutronIps>(this.getFixedIps()));
+                ans.setFixedIps(new ArrayList<>(this.getFixedIps()));
                 break;
             case "device_id":
                 ans.setDeviceID(this.getDeviceID());
@@ -219,11 +219,11 @@ public final class NeutronPort extends NeutronAdminAttributes<NeutronPort> imple
                 ans.setDeviceOwner(this.getDeviceOwner());
                 break;
             case "security_groups":
-                ans.setSecurityGroups(new ArrayList<NeutronSecurityGroup>(this.getSecurityGroups()));
+                ans.setSecurityGroups(new ArrayList<>(this.getSecurityGroups()));
                 break;
             case "allowed_address_pairs":
                 ans.setAllowedAddressPairs(
-                        new ArrayList<NeutronPortAllowedAddressPairs>(this.getAllowedAddressPairs()));
+                        new ArrayList<>(this.getAllowedAddressPairs()));
                 break;
             case "binding:host_id":
                 ans.setBindinghostID(this.getBindinghostID());
@@ -235,10 +235,10 @@ public final class NeutronPort extends NeutronAdminAttributes<NeutronPort> imple
                 ans.setBindingvifType(this.getBindingvifType());
                 break;
             case "binding:vif_details":
-                ans.setVIFDetails(new HashMap<String, String>(this.getVIFDetails()));
+                ans.setVIFDetails(new HashMap<>(this.getVIFDetails()));
                 break;
             case "extra_dhcp_opts":
-                ans.setExtraDHCPOptions(new ArrayList<NeutronPortExtraDHCPOption>(this.getExtraDHCPOptions()));
+                ans.setExtraDHCPOptions(new ArrayList<>(this.getExtraDHCPOptions()));
                 break;
             case "port_security_enabled":
                 ans.setPortSecurityEnabled(this.getPortSecurityEnabled());
@@ -259,7 +259,7 @@ public final class NeutronPort extends NeutronAdminAttributes<NeutronPort> imple
             portSecurityEnabled = true;
         }
         if (fixedIps == null) {
-            fixedIps = new ArrayList<NeutronIps>();
+            fixedIps = new ArrayList<>();
         }
     }
 
index afe21fcc2236abeae4834053648e7c46e2299e75..066adf34246ea44907d85c3e78e453fb66c25a30 100644 (file)
@@ -180,7 +180,7 @@ public final class NeutronSFCFlowClassifier extends NeutronBaseAttributes<Neutro
                 ans.setLogicalDestinationPortUUID(this.getLogicalDestinationPortUUID());
                 break;
             case "l7_parameters":
-                ans.setL7Parameters(new HashMap<String, String>(this.getL7Parameters()));
+                ans.setL7Parameters(new HashMap<>(this.getL7Parameters()));
                 break;
             default:
                 return super.extractField(field, ans);
index af3130e01390d160e60ff76b5497d2d06d605aea..da291dcbab148e8a0f9540fb4e0436884c07bbc8 100644 (file)
@@ -70,7 +70,7 @@ public final class NeutronSFCPortPair extends NeutronBaseAttributes<NeutronSFCPo
                 ans.setEgressPortUUID(this.getEgressPortUUID());
                 break;
             case "service_function_parameters":
-                ans.setServiceFunctionParameters(new HashMap<String, String>(this.getServiceFunctionParameters()));
+                ans.setServiceFunctionParameters(new HashMap<>(this.getServiceFunctionParameters()));
                 break;
             default:
                 return super.extractField(field, ans);
index 289e4bdfb7463bf8af54cc35e79f2074a6d9e105..c5f6bf9c0945a56d2dcf4ce87266e8cdbf304c50 100644 (file)
@@ -172,17 +172,17 @@ public final class NeutronSubnet extends NeutronBaseAttributes<NeutronSubnet> im
                 ans.setGatewayIp(this.getGatewayIp());
                 break;
             case "dns_nameservers":
-                List<String> nsList = new ArrayList<String>();
+                List<String> nsList = new ArrayList<>();
                 nsList.addAll(this.getDnsNameservers());
                 ans.setDnsNameservers(nsList);
                 break;
             case "allocation_pools":
-                List<NeutronSubnetIpAllocationPool> pools = new ArrayList<NeutronSubnetIpAllocationPool>();
+                List<NeutronSubnetIpAllocationPool> pools = new ArrayList<>();
                 pools.addAll(this.getAllocationPools());
                 ans.setAllocationPools(pools);
                 break;
             case "host_routes":
-                List<NeutronRoute> hostRoutes = new ArrayList<NeutronRoute>();
+                List<NeutronRoute> hostRoutes = new ArrayList<>();
                 hostRoutes.addAll(this.getHostRoutes());
                 ans.setHostRoutes(hostRoutes);
                 break;
@@ -269,13 +269,13 @@ public final class NeutronSubnet extends NeutronBaseAttributes<NeutronSubnet> im
             ipVersion = IPV4_VERSION;
         }
         if (dnsNameservers == null) {
-            dnsNameservers = new ArrayList<String>();
+            dnsNameservers = new ArrayList<>();
         }
         if (hostRoutes == null) {
-            hostRoutes = new ArrayList<NeutronRoute>();
+            hostRoutes = new ArrayList<>();
         }
         if (allocationPools == null) {
-            allocationPools = new ArrayList<NeutronSubnetIpAllocationPool>();
+            allocationPools = new ArrayList<>();
             if (ipVersion == IPV4_VERSION) {
                 try {
                     SubnetUtils util = new SubnetUtils(cidr);
index 35b5e55230eadb85c4904ba667f88b7be0bde7ce..81d21145fdfecfe61c325bfaea0151c35cf34891 100644 (file)
@@ -25,11 +25,11 @@ public class JaxbTestHelper {
         Class cls = schemaObject.getClass();
         Class[] types = new Class[1];
         types[0] = cls;
-        Map<String, String> namespacePrefixMapper = new HashMap<String, String>(3);
+        Map<String, String> namespacePrefixMapper = new HashMap<>(3);
         namespacePrefixMapper.put("router", "router");
         namespacePrefixMapper.put("provider", "provider");
         namespacePrefixMapper.put("binding", "binding");
-        Map<String, Object> jaxbProperties = new HashMap<String, Object>(2);
+        Map<String, Object> jaxbProperties = new HashMap<>(2);
         jaxbProperties.put(JAXBContextProperties.MEDIA_TYPE, "application/json");
         jaxbProperties.put(JAXBContextProperties.JSON_INCLUDE_ROOT, false);
         jaxbProperties.put(JAXBContextProperties.JSON_NAMESPACE_SEPARATOR, ':');
index 2db22cc26b239c7bc1cdaab8bf4420247878f409..80f17f2594895ef3b613c6f4c0862ed3cd78fc43 100644 (file)
@@ -60,7 +60,7 @@ public class NeutronLoadBalancerHealthMonitorJAXBTest {
 
         NeutronID neutronId = new NeutronID();
         neutronId.setID("2f245a7b-0000-4f26-9cf9-9e82d248fda7");
-        List<NeutronID> loadBalancerHealthMonitorPool = new ArrayList<NeutronID>();
+        List<NeutronID> loadBalancerHealthMonitorPool = new ArrayList<>();
         loadBalancerHealthMonitorPool.add(neutronId);
         testObject.setLoadBalancerHealthMonitorPools(loadBalancerHealthMonitorPool);
         Assert.assertEquals("NeutronLoadBalancerHealthMonitor JAXB Test 11: Testing Pools failed",
index 2cdcd82714e4ee4fbe0867329b45fc7072b9c8dd..ca3794532baede8597209624edc766ecb3271bc6 100644 (file)
@@ -47,7 +47,7 @@ public class NeutronSubnetTest {
         NeutronSubnetIpAllocationPool allocationPool = new NeutronSubnetIpAllocationPool();
         allocationPool.setPoolStart("10.18.0.2");
         allocationPool.setPoolEnd("10.18.0.6");
-        List<NeutronSubnetIpAllocationPool> pools = new ArrayList<NeutronSubnetIpAllocationPool>();
+        List<NeutronSubnetIpAllocationPool> pools = new ArrayList<>();
         pools.add(allocationPool);
         objectUT.setAllocationPools(pools);
 
@@ -69,7 +69,7 @@ public class NeutronSubnetTest {
         allocationPool = new NeutronSubnetIpAllocationPool();
         allocationPool.setPoolStart("2015::2");
         allocationPool.setPoolEnd("2015::6");
-        pools = new ArrayList<NeutronSubnetIpAllocationPool>();
+        pools = new ArrayList<>();
         pools.add(allocationPool);
         objectUT.setAllocationPools(pools);
 
@@ -117,7 +117,7 @@ public class NeutronSubnetTest {
         NeutronSubnetIpAllocationPool allocationPool = new NeutronSubnetIpAllocationPool();
         allocationPool.setPoolStart("10.18.0.2");
         allocationPool.setPoolEnd("10.18.0.6");
-        List<NeutronSubnetIpAllocationPool> pools = new ArrayList<NeutronSubnetIpAllocationPool>();
+        List<NeutronSubnetIpAllocationPool> pools = new ArrayList<>();
         pools.add(allocationPool);
         allocationPool = new NeutronSubnetIpAllocationPool();
         allocationPool.setPoolStart("10.18.0.10");
@@ -132,7 +132,7 @@ public class NeutronSubnetTest {
         allocationPool = new NeutronSubnetIpAllocationPool();
         allocationPool.setPoolStart("2015::2");
         allocationPool.setPoolEnd("2015::6");
-        pools = new ArrayList<NeutronSubnetIpAllocationPool>();
+        pools = new ArrayList<>();
         pools.add(allocationPool);
         allocationPool = new NeutronSubnetIpAllocationPool();
         allocationPool.setPoolStart("2015::10");
index d022ce72551c61657b8cb1d413a5a2539e4d1160..904e982db99a565cffd6590aace18df29bc235a6 100644 (file)
@@ -26,7 +26,7 @@ public final class NeutronNorthboundRSApplication extends Application {
 
     @Override
     public Set<Class<?>> getClasses() {
-        Set<Class<?>> classes = new HashSet<Class<?>>();
+        Set<Class<?>> classes = new HashSet<>();
         // northbound URIs
         classes.add(NeutronNetworksNorthbound.class);
         classes.add(NeutronSubnetsNorthbound.class);
@@ -72,7 +72,7 @@ public final class NeutronNorthboundRSApplication extends Application {
         moxyJsonProvider.setMarshalEmptyCollections(true);
         moxyJsonProvider.setValueWrapper("$");
 
-        Map<String, String> namespacePrefixMapper = new HashMap<String, String>(HASHMAP_SIZE);
+        Map<String, String> namespacePrefixMapper = new HashMap<>(HASHMAP_SIZE);
         // FIXME: fill in next two with XSD
         namespacePrefixMapper.put("router", "router");
         namespacePrefixMapper.put("provider", "provider");
@@ -80,7 +80,7 @@ public final class NeutronNorthboundRSApplication extends Application {
         moxyJsonProvider.setNamespacePrefixMapper(namespacePrefixMapper);
         moxyJsonProvider.setNamespaceSeparator(':');
 
-        Set<Object> set = new HashSet<Object>(1);
+        Set<Object> set = new HashSet<>(1);
         set.add(moxyJsonProvider);
         return set;
     }
index 3a8ea92de2f0560239fff0409dbe8751db9fa4e7..84d1b478ef4508b4c284de95156ec5cd93537ad5 100644 (file)
@@ -155,6 +155,6 @@ public final class PaginatedRequestFactory {
             links.add(previous);
         }
 
-        return new PaginationResults<T>(collection, links);
+        return new PaginationResults<>(collection, links);
     }
 }
index 58e7456d9025441c8b14662b7bbb5f652626d964..cee364351bdc628d7f849248d1a7255ec120c930 100644 (file)
@@ -389,7 +389,7 @@ public abstract class AbstractNeutronInterface<T extends DataObject & Identifiab
 
     private List<S> getAll(ReadTransaction tx) {
         Preconditions.checkNotNull(tx);
-        final Set<S> allNeutronObjects = new HashSet<S>();
+        final Set<S> allNeutronObjects = new HashSet<>();
         final U dataObjects = readMd(createInstanceIdentifier(), tx);
         if (dataObjects != null) {
             for (final T dataObject : getDataObjectList(dataObjects)) {
@@ -397,7 +397,7 @@ public abstract class AbstractNeutronInterface<T extends DataObject & Identifiab
             }
         }
         LOGGER.debug("Exiting _getAll, Found {} OpenStackFirewall", allNeutronObjects.size());
-        final List<S> ans = new ArrayList<S>();
+        final List<S> ans = new ArrayList<>();
         ans.addAll(allNeutronObjects);
         return ans;
     }
index fcf486363b0a346f4cfcfb1d755ab068496ae0fa..05d26dc3ef8e204dc90f46887fac999617f2b699 100644 (file)
@@ -57,42 +57,42 @@ public final class NeutronBgpvpnInterface extends AbstractNeutronInterface<Bgpvp
             result.setTechnique(bgpvpn.getTechnique());
         }
         if (bgpvpn.getRouteTargets() != null) {
-            final List<String> routeTargets = new ArrayList<String>();
+            final List<String> routeTargets = new ArrayList<>();
             for (final String routeTarget : bgpvpn.getRouteTargets()) {
                 routeTargets.add(routeTarget);
             }
             result.setRouteTargets(routeTargets);
         }
         if (bgpvpn.getImportTargets() != null) {
-            final List<String> importTargets = new ArrayList<String>();
+            final List<String> importTargets = new ArrayList<>();
             for (final String importTarget : bgpvpn.getImportTargets()) {
                 importTargets.add(importTarget);
             }
             result.setImportTargets(importTargets);
         }
         if (bgpvpn.getExportTargets() != null) {
-            final List<String> exportTargets = new ArrayList<String>();
+            final List<String> exportTargets = new ArrayList<>();
             for (final String exportTarget : bgpvpn.getExportTargets()) {
                 exportTargets.add(exportTarget);
             }
             result.setExportTargets(exportTargets);
         }
         if (bgpvpn.getRouteDistinguishers() != null) {
-            final List<String> routeDistinguishers = new ArrayList<String>();
+            final List<String> routeDistinguishers = new ArrayList<>();
             for (final String routeDistinguisher : bgpvpn.getRouteDistinguishers()) {
                 routeDistinguishers.add(routeDistinguisher);
             }
             result.setRouteDistinguishers(routeDistinguishers);
         }
         if (bgpvpn.getRouters() != null) {
-            final List<String> routers = new ArrayList<String>();
+            final List<String> routers = new ArrayList<>();
             for (final Uuid router : bgpvpn.getRouters()) {
                 routers.add(router.getValue());
             }
             result.setRouters(routers);
         }
         if (bgpvpn.getNetworks() != null) {
-            final List<String> networks = new ArrayList<String>();
+            final List<String> networks = new ArrayList<>();
             for (final Uuid network : bgpvpn.getNetworks()) {
                 networks.add(network.getValue());
             }
@@ -120,42 +120,42 @@ public final class NeutronBgpvpnInterface extends AbstractNeutronInterface<Bgpvp
             bgpvpnBuilder.setTechnique(bgpvpn.getTechnique());
         }
         if (bgpvpn.getRouteTargets() != null) {
-            final List<String> routeTargets = new ArrayList<String>();
+            final List<String> routeTargets = new ArrayList<>();
             for (final String routeTarget : bgpvpn.getRouteTargets()) {
                 routeTargets.add(routeTarget);
             }
             bgpvpnBuilder.setRouteTargets(routeTargets);
         }
         if (bgpvpn.getImportTargets() != null) {
-            final List<String> importTargets = new ArrayList<String>();
+            final List<String> importTargets = new ArrayList<>();
             for (final String importTarget : bgpvpn.getImportTargets()) {
                 importTargets.add(importTarget);
             }
             bgpvpnBuilder.setImportTargets(importTargets);
         }
         if (bgpvpn.getExportTargets() != null) {
-            final List<String> exportTargets = new ArrayList<String>();
+            final List<String> exportTargets = new ArrayList<>();
             for (final String exportTarget : bgpvpn.getExportTargets()) {
                 exportTargets.add(exportTarget);
             }
             bgpvpnBuilder.setExportTargets(exportTargets);
         }
         if (bgpvpn.getRouteDistinguishers() != null) {
-            final List<String> routeDistinguishers = new ArrayList<String>();
+            final List<String> routeDistinguishers = new ArrayList<>();
             for (final String routeDistinguisher : bgpvpn.getRouteDistinguishers()) {
                 routeDistinguishers.add(routeDistinguisher);
             }
             bgpvpnBuilder.setRouteDistinguishers(routeDistinguishers);
         }
         if (bgpvpn.getRouters() != null) {
-            final List<Uuid> routers = new ArrayList<Uuid>();
+            final List<Uuid> routers = new ArrayList<>();
             for (final String router : bgpvpn.getRouters()) {
                 routers.add(toUuid(router));
             }
             bgpvpnBuilder.setRouters(routers);
         }
         if (bgpvpn.getNetworks() != null) {
-            final List<Uuid> networks = new ArrayList<Uuid>();
+            final List<Uuid> networks = new ArrayList<>();
             for (final String network : bgpvpn.getNetworks()) {
                 networks.add(toUuid(network));
             }
index 2527e6f6942f724dba659cf4e95ca73540257e3e..fdd770677d304af4e1069da8bbb9050e2e1957eb 100644 (file)
@@ -39,7 +39,7 @@ public final class NeutronL2gatewayInterface
     @Override
     protected NeutronL2gateway fromMd(L2gateway l2gateway) {
         final NeutronL2gateway result = new NeutronL2gateway();
-        final List<NeutronL2gatewayDevice> neutronL2gatewayDevices = new ArrayList<NeutronL2gatewayDevice>();
+        final List<NeutronL2gatewayDevice> neutronL2gatewayDevices = new ArrayList<>();
 
         if (l2gateway.getUuid() != null) {
             result.setID(l2gateway.getUuid().getValue());
@@ -53,8 +53,7 @@ public final class NeutronL2gatewayInterface
         if (l2gateway.getDevices() != null) {
             for (final Devices device : l2gateway.getDevices()) {
                 final NeutronL2gatewayDevice neutronL2gatewayDevice = new NeutronL2gatewayDevice();
-                final List<NeutronL2gatewayDeviceInterface> neutronL2gatewayDeviceInterfaces = new ArrayList<
-                        NeutronL2gatewayDeviceInterface>();
+                final List<NeutronL2gatewayDeviceInterface> neutronL2gatewayDeviceInterfaces = new ArrayList<>();
                 if (device.getDeviceName() != null) {
                     neutronL2gatewayDevice.setDeviceName(device.getDeviceName().toString());
                 }
@@ -66,7 +65,7 @@ public final class NeutronL2gatewayInterface
                         final NeutronL2gatewayDeviceInterface neutronL2gatewayDeviceInterface =
                                 new NeutronL2gatewayDeviceInterface();
                         String interfaceName = null;
-                        final List<Integer> segmentationIds = new ArrayList<Integer>();
+                        final List<Integer> segmentationIds = new ArrayList<>();
                         if (deviceInterface.getInterfaceName() != null) {
                             interfaceName = deviceInterface.getInterfaceName().toString();
                         }
@@ -109,7 +108,7 @@ public final class NeutronL2gatewayInterface
                 for (final NeutronL2gatewayDeviceInterface neutronL2gatewayDeviceInterface : neutronL2gatewayDevice
                         .getNeutronL2gatewayDeviceInterfaces()) {
                     final InterfacesBuilder interfacesBuilder = new InterfacesBuilder();
-                    final List<Integer> segmentIds = new ArrayList<Integer>();
+                    final List<Integer> segmentIds = new ArrayList<>();
                     interfacesBuilder.setInterfaceName(neutronL2gatewayDeviceInterface.getInterfaceName());
                     if (neutronL2gatewayDeviceInterface.getSegmentationId() != null) {
                         for (final Integer segmentationId : neutronL2gatewayDeviceInterface.getSegmentationId()) {
index 0d7cced8485a0dbd31263d03ae5b43168dfe3e42..3cf5e236fc7778f020649e5411d5916fa019bfae 100644 (file)
@@ -65,7 +65,7 @@ public final class NeutronLoadBalancerHealthMonitorInterface
             healthmonitorBuilder.setMaxRetries(Integer.valueOf(healthMonitor.getLoadBalancerHealthMonitorMaxRetries()));
         }
         if (healthMonitor.getLoadBalancerHealthMonitorPools() != null) {
-            final List<Uuid> listUuid = new ArrayList<Uuid>();
+            final List<Uuid> listUuid = new ArrayList<>();
             for (final NeutronID neutronId : healthMonitor.getLoadBalancerHealthMonitorPools()) {
                 listUuid.add(toUuid(neutronId.getID()));
             }
@@ -111,7 +111,7 @@ public final class NeutronLoadBalancerHealthMonitorInterface
             answer.setLoadBalancerHealthMonitorMaxRetries(Integer.valueOf(healthMonitor.getMaxRetries()));
         }
         if (healthMonitor.getPools() != null) {
-            final List<NeutronID> list = new ArrayList<NeutronID>();
+            final List<NeutronID> list = new ArrayList<>();
             for (final Uuid id : healthMonitor.getPools()) {
                 list.add(new NeutronID(id.getValue()));
             }
index 5ecb6d2e501df5a108f8c642e95f7e2a765eccff..cdac008e2d52bbddf974c2a75c2391321184591e 100644 (file)
@@ -56,7 +56,7 @@ public final class NeutronLoadBalancerListenerInterface
             listenerBuilder.setDefaultPoolId(toUuid(listener.getNeutronLoadBalancerListenerDefaultPoolID()));
         }
         if (listener.getNeutronLoadBalancerListenerLoadBalancerIDs() != null) {
-            final List<Uuid> listLoadBalancers = new ArrayList<Uuid>();
+            final List<Uuid> listLoadBalancers = new ArrayList<>();
             for (final NeutronID neutronId : listener.getNeutronLoadBalancerListenerLoadBalancerIDs()) {
                 listLoadBalancers.add(toUuid(neutronId.getID()));
             }
@@ -92,7 +92,7 @@ public final class NeutronLoadBalancerListenerInterface
             answer.setNeutronLoadBalancerListenerDefaultPoolID(listener.getDefaultPoolId().getValue());
         }
         if (listener.getLoadbalancers() != null) {
-            final List<NeutronID> list = new ArrayList<NeutronID>();
+            final List<NeutronID> list = new ArrayList<>();
             for (final Uuid id : listener.getLoadbalancers()) {
                 list.add(new NeutronID(id.getValue()));
             }
index d660c05e7bf19bc2bf3d3dafcf3344a284e5219d..9ff0cd0fc89dab282b4baf9740f037da06f27562 100644 (file)
@@ -77,7 +77,7 @@ public final class NeutronLoadBalancerPoolInterface
             poolBuilder.setLbAlgorithm(pool.getLoadBalancerPoolLbAlgorithm());
         }
         if (pool.getLoadBalancerPoolListeners() != null) {
-            final List<Uuid> listListener = new ArrayList<Uuid>();
+            final List<Uuid> listListener = new ArrayList<>();
             for (final NeutronID neutronId : pool.getLoadBalancerPoolListeners()) {
                 listListener.add(toUuid(neutronId.getID()));
             }
@@ -123,14 +123,14 @@ public final class NeutronLoadBalancerPoolInterface
             answer.setLoadBalancerPoolLbAlgorithm(pool.getLbAlgorithm());
         }
         if (pool.getListeners() != null) {
-            final List<NeutronID> ids = new ArrayList<NeutronID>();
+            final List<NeutronID> ids = new ArrayList<>();
             for (final Uuid id : pool.getListeners()) {
                 ids.add(new NeutronID(id.getValue()));
             }
             answer.setLoadBalancerPoolListeners(ids);
         }
         if (pool.getMembers() != null) {
-            final List<NeutronLoadBalancerPoolMember> members = new ArrayList<NeutronLoadBalancerPoolMember>();
+            final List<NeutronLoadBalancerPoolMember> members = new ArrayList<>();
             for (final Member member : pool.getMembers().getMember()) {
                 members.add(fromMemberMd(member));
             }
@@ -176,8 +176,7 @@ public final class NeutronLoadBalancerPoolInterface
     }
 
     public List<NeutronLoadBalancerPoolMember> getAllNeutronLoadBalancerPoolMembers(String poolUuid) {
-        final Set<NeutronLoadBalancerPoolMember> allLoadBalancerPoolMembers = new HashSet<
-                NeutronLoadBalancerPoolMember>();
+        final Set<NeutronLoadBalancerPoolMember> allLoadBalancerPoolMembers = new HashSet<>();
         final Members members = readMd(createMembersInstanceIdentifier(toMd(poolUuid)));
         if (members != null) {
             for (final Member member : members.getMember()) {
@@ -186,7 +185,7 @@ public final class NeutronLoadBalancerPoolInterface
         }
         LOGGER.debug("Exiting getLoadBalancerPoolMembers, Found {} OpenStackLoadBalancerPoolMember",
                 allLoadBalancerPoolMembers.size());
-        final List<NeutronLoadBalancerPoolMember> ans = new ArrayList<NeutronLoadBalancerPoolMember>();
+        final List<NeutronLoadBalancerPoolMember> ans = new ArrayList<>();
         ans.addAll(allLoadBalancerPoolMembers);
         return ans;
     }
index 226b88ed68fc9ee9c9e79357595b2c1931c9ddcb..a9179433d6833b9ca8bf5f256820d45115e975a2 100644 (file)
@@ -64,7 +64,7 @@ public final class NeutronNetworkInterface
         result.setProviderPhysicalNetwork(providerExtension.getPhysicalNetwork());
         result.setProviderSegmentationID(providerExtension.getSegmentationId());
         result.setProviderNetworkType(NETWORK_MAP.get(providerExtension.getNetworkType()));
-        final List<NeutronNetworkSegment> segments = new ArrayList<NeutronNetworkSegment>();
+        final List<NeutronNetworkSegment> segments = new ArrayList<>();
         if (providerExtension.getSegments() != null) {
             for (final Segments segment : providerExtension.getSegments()) {
                 final NeutronNetworkSegment neutronSegment = new NeutronNetworkSegment();
index 86e09b5d9139a0a7ab46f6e112fc5b3a346aa65e..bc7520735ff5a9912d2bda68855847de361bf8a9 100644 (file)
@@ -97,7 +97,7 @@ public final class NeutronPortInterface extends AbstractNeutronInterface<Port, P
         final NeutronPort result = new NeutronPort();
         fromMdAdminAttributes(port, result);
         if (port.getAllowedAddressPairs() != null) {
-            final List<NeutronPortAllowedAddressPairs> pairs = new ArrayList<NeutronPortAllowedAddressPairs>();
+            final List<NeutronPortAllowedAddressPairs> pairs = new ArrayList<>();
             for (final AllowedAddressPairs mdPair : port.getAllowedAddressPairs()) {
                 final NeutronPortAllowedAddressPairs pair = new NeutronPortAllowedAddressPairs();
                 pair.setIpAddress(String.valueOf(mdPair.getIpAddress().getValue()));
@@ -109,7 +109,7 @@ public final class NeutronPortInterface extends AbstractNeutronInterface<Port, P
         result.setDeviceID(port.getDeviceId());
         result.setDeviceOwner(port.getDeviceOwner());
         if (port.getExtraDhcpOpts() != null) {
-            final List<NeutronPortExtraDHCPOption> options = new ArrayList<NeutronPortExtraDHCPOption>();
+            final List<NeutronPortExtraDHCPOption> options = new ArrayList<>();
             for (final ExtraDhcpOpts opt : port.getExtraDhcpOpts()) {
                 final NeutronPortExtraDHCPOption arg = new NeutronPortExtraDHCPOption();
                 arg.setName(opt.getOptName());
@@ -120,7 +120,7 @@ public final class NeutronPortInterface extends AbstractNeutronInterface<Port, P
             result.setExtraDHCPOptions(options);
         }
         if (port.getFixedIps() != null) {
-            final List<NeutronIps> ips = new ArrayList<NeutronIps>();
+            final List<NeutronIps> ips = new ArrayList<>();
             for (final FixedIps mdIp : port.getFixedIps()) {
                 final NeutronIps ip = new NeutronIps();
                 ip.setIpAddress(String.valueOf(mdIp.getIpAddress().getValue()));
@@ -132,13 +132,13 @@ public final class NeutronPortInterface extends AbstractNeutronInterface<Port, P
         result.setMacAddress(port.getMacAddress().getValue());
         result.setNetworkUUID(String.valueOf(port.getNetworkId().getValue()));
         if (port.getSecurityGroups() != null) {
-            final Set<NeutronSecurityGroup> allGroups = new HashSet<NeutronSecurityGroup>();
+            final Set<NeutronSecurityGroup> allGroups = new HashSet<>();
             for (final Uuid sgUuid : port.getSecurityGroups()) {
                 final NeutronSecurityGroup sg = new NeutronSecurityGroup();
                 sg.setID(sgUuid.getValue());
                 allGroups.add(sg);
             }
-            final List<NeutronSecurityGroup> groups = new ArrayList<NeutronSecurityGroup>();
+            final List<NeutronSecurityGroup> groups = new ArrayList<>();
             groups.addAll(allGroups);
             result.setSecurityGroups(groups);
         }
@@ -236,7 +236,7 @@ public final class NeutronPortInterface extends AbstractNeutronInterface<Port, P
             portBuilder.setNetworkId(toUuid(neutronPort.getNetworkUUID()));
         }
         if (neutronPort.getSecurityGroups() != null) {
-            final List<Uuid> listSecurityGroups = new ArrayList<Uuid>();
+            final List<Uuid> listSecurityGroups = new ArrayList<>();
             for (final NeutronSecurityGroup neutronSecurityGroup : neutronPort.getSecurityGroups()) {
                 listSecurityGroups.add(toUuid(neutronSecurityGroup.getID()));
             }
index 5a7aa73b30ef5007970c07b0ffff7b2b121ecbac..03ede60142bb324fc4a686ea30a32f8f678b8b1a 100644 (file)
@@ -64,8 +64,7 @@ public final class NeutronRouterInterface extends AbstractNeutronInterface<Route
         }
         if (router.getExternalGatewayInfo() != null) {
             ExternalGatewayInfo externalGatewayInfo = null;
-            final List<NeutronRouterNetworkReference> neutronRouterNetworkReferences = new ArrayList<
-                    NeutronRouterNetworkReference>();
+            final List<NeutronRouterNetworkReference> neutronRouterNetworkReferences = new ArrayList<>();
             neutronRouterNetworkReferences.add(router.getExternalGatewayInfo());
             for (final NeutronRouterNetworkReference externalGatewayInfos : neutronRouterNetworkReferences) {
                 final ExternalGatewayInfoBuilder builder = new ExternalGatewayInfoBuilder();
@@ -96,7 +95,7 @@ public final class NeutronRouterInterface extends AbstractNeutronInterface<Route
             result.setGatewayPortId(String.valueOf(router.getGatewayPortId().getValue()));
         }
         if (router.getRoutes() != null) {
-            final List<NeutronRoute> routes = new ArrayList<NeutronRoute>();
+            final List<NeutronRoute> routes = new ArrayList<>();
             for (final Routes route : router.getRoutes()) {
                 final NeutronRoute routerRoute = new NeutronRoute();
                 routerRoute.setDestination(String.valueOf(route.getDestination().getValue()));
@@ -111,7 +110,7 @@ public final class NeutronRouterInterface extends AbstractNeutronInterface<Route
             extGwInfo.setNetworkID(String.valueOf(router.getExternalGatewayInfo().getExternalNetworkId().getValue()));
             extGwInfo.setEnableSNAT(router.getExternalGatewayInfo().isEnableSnat());
             if (router.getExternalGatewayInfo().getExternalFixedIps() != null) {
-                final List<NeutronIps> fixedIps = new ArrayList<NeutronIps>();
+                final List<NeutronIps> fixedIps = new ArrayList<>();
                 for (final ExternalFixedIps mdFixedIp : router.getExternalGatewayInfo().getExternalFixedIps()) {
                     final NeutronIps fixedIp = new NeutronIps();
                     fixedIp.setSubnetUUID(String.valueOf(mdFixedIp.getSubnetId().getValue()));
index c1f82aab8a3ae5e637b9bc97d5bc3cb44929ea2e..c428f4e53f7d3b1fa007e7187ab466071efad467 100644 (file)
@@ -79,7 +79,7 @@ public final class NeutronSubnetInterface extends AbstractNeutronInterface<Subne
         }
         result.setEnableDHCP(subnet.isEnableDhcp());
         if (subnet.getAllocationPools() != null) {
-            final List<NeutronSubnetIpAllocationPool> allocationPools = new ArrayList<NeutronSubnetIpAllocationPool>();
+            final List<NeutronSubnetIpAllocationPool> allocationPools = new ArrayList<>();
             for (final AllocationPools allocationPool : subnet.getAllocationPools()) {
                 final NeutronSubnetIpAllocationPool pool = new NeutronSubnetIpAllocationPool();
                 pool.setPoolStart(String.valueOf(allocationPool.getStart().getValue()));
@@ -89,14 +89,14 @@ public final class NeutronSubnetInterface extends AbstractNeutronInterface<Subne
             result.setAllocationPools(allocationPools);
         }
         if (subnet.getDnsNameservers() != null) {
-            final List<String> dnsNameServers = new ArrayList<String>();
+            final List<String> dnsNameServers = new ArrayList<>();
             for (final IpAddress dnsNameServer : subnet.getDnsNameservers()) {
                 dnsNameServers.add(String.valueOf(dnsNameServer.getValue()));
             }
             result.setDnsNameservers(dnsNameServers);
         }
         if (subnet.getHostRoutes() != null) {
-            final List<NeutronRoute> hostRoutes = new ArrayList<NeutronRoute>();
+            final List<NeutronRoute> hostRoutes = new ArrayList<>();
             for (final HostRoutes hostRoute : subnet.getHostRoutes()) {
                 final NeutronRoute nsHostRoute = new NeutronRoute();
                 nsHostRoute.setDestination(String.valueOf(hostRoute.getDestination().getValue()));
@@ -147,7 +147,7 @@ public final class NeutronSubnetInterface extends AbstractNeutronInterface<Subne
             subnetBuilder.setAllocationPools(allocationPools);
         }
         if (subnet.getDnsNameservers() != null) {
-            final List<IpAddress> dnsNameServers = new ArrayList<IpAddress>();
+            final List<IpAddress> dnsNameServers = new ArrayList<>();
             for (final String dnsNameServer : subnet.getDnsNameservers()) {
                 final IpAddress ipAddress = new IpAddress(dnsNameServer.toCharArray());
                 dnsNameServers.add(ipAddress);
index 62db1dfdb67f5d64a9eeb6d718455335150303cf..e1737bbfe5031dc1625f5eec62a6ea72ed7ed2ed 100644 (file)
@@ -41,7 +41,7 @@ public final class NeutronVpnIpSecSiteConnectionsInterface
             answer.setPeerAddress(ipsecSiteConnection.getPeerAddress());
         }
         if (ipsecSiteConnection.getPeerCidrs() != null) {
-            final List<String> peerCidrs = new ArrayList<String>();
+            final List<String> peerCidrs = new ArrayList<>();
             for (final String peerCidr : ipsecSiteConnection.getPeerCidrs()) {
                 peerCidrs.add(peerCidr);
             }
@@ -92,7 +92,7 @@ public final class NeutronVpnIpSecSiteConnectionsInterface
             ipsecSiteConnectionBuilder.setPeerAddress(ipsecSiteConnection.getPeerAddress());
         }
         if (ipsecSiteConnection.getPeerCidrs() != null) {
-            final List<String> peerCidrs = new ArrayList<String>();
+            final List<String> peerCidrs = new ArrayList<>();
             for (final String peerCidr : ipsecSiteConnection.getPeerCidrs()) {
                 peerCidrs.add(peerCidr);
             }