ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aonis...@apache.org
Subject [09/55] [abbrv] ambari git commit: AMBARI-19149. Code cleanup: redundant type arguments
Date Fri, 31 Mar 2017 07:22:16 GMT
http://git-wip-us.apache.org/repos/asf/ambari/blob/e8080350/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProviderTest.java
index 9e60dad..f890e17 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProviderTest.java
@@ -222,7 +222,7 @@ public class ClusterStackVersionResourceProviderTest {
     repoVersion.setId(1l);
     repoVersion.setOperatingSystems(OS_JSON);
 
-    Map<String, Host> hostsForCluster = new HashMap<String, Host>();
+    Map<String, Host> hostsForCluster = new HashMap<>();
     int hostCount = 10;
     for (int i = 0; i < hostCount; i++) {
       String hostname = "host" + i;
@@ -271,7 +271,7 @@ public class ClusterStackVersionResourceProviderTest {
 
     AbstractControllerResourceProvider.init(resourceProviderFactory);
 
-    Map<String, Map<String, String>> hostConfigTags = new HashMap<String, Map<String, String>>();
+    Map<String, Map<String, String>> hostConfigTags = new HashMap<>();
     expect(configHelper.getEffectiveDesiredTags(anyObject(ClusterImpl.class), anyObject(String.class))).andReturn(hostConfigTags);
 
     expect(managementController.getClusters()).andReturn(clusters).anyTimes();
@@ -363,9 +363,9 @@ public class ClusterStackVersionResourceProviderTest {
     injector.injectMembers(provider);
 
     // add the property map to a set for the request.  add more maps for multiple creates
-    Set<Map<String, Object>> propertySet = new LinkedHashSet<Map<String, Object>>();
+    Set<Map<String, Object>> propertySet = new LinkedHashSet<>();
 
-    Map<String, Object> properties = new LinkedHashMap<String, Object>();
+    Map<String, Object> properties = new LinkedHashMap<>();
 
     // add properties to the request map
     properties.put(ClusterStackVersionResourceProvider.CLUSTER_STACK_VERSION_CLUSTER_NAME_PROPERTY_ID, "Cluster100");
@@ -413,7 +413,7 @@ public class ClusterStackVersionResourceProviderTest {
     ambariMetaInfo.getComponent("HDP", "2.1.1", "HBASE", "HBASE_MASTER").setVersionAdvertised(true);
 
 
-    Map<String, Host> hostsForCluster = new HashMap<String, Host>();
+    Map<String, Host> hostsForCluster = new HashMap<>();
     int hostCount = 10;
     for (int i = 0; i < hostCount; i++) {
       String hostname = "host" + i;
@@ -491,7 +491,7 @@ public class ClusterStackVersionResourceProviderTest {
 
     AbstractControllerResourceProvider.init(resourceProviderFactory);
 
-    Map<String, Map<String, String>> hostConfigTags = new HashMap<String, Map<String, String>>();
+    Map<String, Map<String, String>> hostConfigTags = new HashMap<>();
     expect(configHelper.getEffectiveDesiredTags(anyObject(ClusterImpl.class), anyObject(String.class))).andReturn(hostConfigTags);
 
     expect(managementController.getClusters()).andReturn(clusters).anyTimes();
@@ -585,9 +585,9 @@ public class ClusterStackVersionResourceProviderTest {
     injector.injectMembers(provider);
 
     // add the property map to a set for the request.  add more maps for multiple creates
-    Set<Map<String, Object>> propertySet = new LinkedHashSet<Map<String, Object>>();
+    Set<Map<String, Object>> propertySet = new LinkedHashSet<>();
 
-    Map<String, Object> properties = new LinkedHashMap<String, Object>();
+    Map<String, Object> properties = new LinkedHashMap<>();
 
     // add properties to the request map
     properties.put(ClusterStackVersionResourceProvider.CLUSTER_STACK_VERSION_CLUSTER_NAME_PROPERTY_ID, "Cluster100");
@@ -646,7 +646,7 @@ public class ClusterStackVersionResourceProviderTest {
     ambariMetaInfo.getComponent("HDP", "2.1.1", "HBASE", "HBASE_MASTER").setVersionAdvertised(true);
 
 
-    Map<String, Host> hostsForCluster = new HashMap<String, Host>();
+    Map<String, Host> hostsForCluster = new HashMap<>();
     int hostCount = 10;
     for (int i = 0; i < hostCount; i++) {
       String hostname = "host" + i;
@@ -708,7 +708,7 @@ public class ClusterStackVersionResourceProviderTest {
 
     AbstractControllerResourceProvider.init(resourceProviderFactory);
 
-    Map<String, Map<String, String>> hostConfigTags = new HashMap<String, Map<String, String>>();
+    Map<String, Map<String, String>> hostConfigTags = new HashMap<>();
     expect(configHelper.getEffectiveDesiredTags(anyObject(ClusterImpl.class), anyObject(String.class))).andReturn(hostConfigTags);
 
     expect(managementController.getClusters()).andReturn(clusters).anyTimes();
@@ -807,9 +807,9 @@ public class ClusterStackVersionResourceProviderTest {
     injector.injectMembers(provider);
 
     // add the property map to a set for the request.  add more maps for multiple creates
-    Set<Map<String, Object>> propertySet = new LinkedHashSet<Map<String, Object>>();
+    Set<Map<String, Object>> propertySet = new LinkedHashSet<>();
 
-    Map<String, Object> properties = new LinkedHashMap<String, Object>();
+    Map<String, Object> properties = new LinkedHashMap<>();
 
     // add properties to the request map
     properties.put(ClusterStackVersionResourceProvider.CLUSTER_STACK_VERSION_CLUSTER_NAME_PROPERTY_ID, "Cluster100");
@@ -878,7 +878,7 @@ public class ClusterStackVersionResourceProviderTest {
 
     ambariMetaInfo.getComponent("HDP", "2.1.1", "HBASE", "HBASE_MASTER").setVersionAdvertised(true);
 
-    Map<String, Host> hostsForCluster = new HashMap<String, Host>();
+    Map<String, Host> hostsForCluster = new HashMap<>();
     int hostCount = 10;
     for (int i = 0; i < hostCount; i++) {
       String hostname = "host" + i;
@@ -940,7 +940,7 @@ public class ClusterStackVersionResourceProviderTest {
 
     AbstractControllerResourceProvider.init(resourceProviderFactory);
 
-    Map<String, Map<String, String>> hostConfigTags = new HashMap<String, Map<String, String>>();
+    Map<String, Map<String, String>> hostConfigTags = new HashMap<>();
     expect(configHelper.getEffectiveDesiredTags(anyObject(ClusterImpl.class), anyObject(String.class))).andReturn(hostConfigTags);
 
     expect(managementController.getClusters()).andReturn(clusters).anyTimes();
@@ -1038,9 +1038,9 @@ public class ClusterStackVersionResourceProviderTest {
     injector.injectMembers(provider);
 
     // add the property map to a set for the request.  add more maps for multiple creates
-    Set<Map<String, Object>> propertySet = new LinkedHashSet<Map<String, Object>>();
+    Set<Map<String, Object>> propertySet = new LinkedHashSet<>();
 
-    Map<String, Object> properties = new LinkedHashMap<String, Object>();
+    Map<String, Object> properties = new LinkedHashMap<>();
 
     // add properties to the request map
     properties.put(ClusterStackVersionResourceProvider.CLUSTER_STACK_VERSION_CLUSTER_NAME_PROPERTY_ID, "Cluster100");
@@ -1152,7 +1152,7 @@ public class ClusterStackVersionResourceProviderTest {
 
     AbstractControllerResourceProvider.init(resourceProviderFactory);
 
-    Map<String, Map<String, String>> hostConfigTags = new HashMap<String, Map<String, String>>();
+    Map<String, Map<String, String>> hostConfigTags = new HashMap<>();
     expect(configHelper.getEffectiveDesiredTags(anyObject(ClusterImpl.class), anyObject(String.class))).andReturn(hostConfigTags);
 
     expect(managementController.getClusters()).andReturn(clusters).anyTimes();
@@ -1206,7 +1206,7 @@ public class ClusterStackVersionResourceProviderTest {
     field.set(provider, finalizeUpgradeAction);
 
     // add the property map to a set for the request.  add more maps for multiple creates
-    Map<String, Object> properties = new LinkedHashMap<String, Object>();
+    Map<String, Object> properties = new LinkedHashMap<>();
 
     // add properties to the request map
     properties.put(ClusterStackVersionResourceProvider.CLUSTER_STACK_VERSION_CLUSTER_NAME_PROPERTY_ID, clusterName);
@@ -1305,7 +1305,7 @@ public class ClusterStackVersionResourceProviderTest {
 
     AbstractControllerResourceProvider.init(resourceProviderFactory);
 
-    Map<String, Map<String, String>> hostConfigTags = new HashMap<String, Map<String, String>>();
+    Map<String, Map<String, String>> hostConfigTags = new HashMap<>();
     expect(configHelper.getEffectiveDesiredTags(anyObject(ClusterImpl.class), anyObject(String.class))).andReturn(hostConfigTags);
 
     expect(managementController.getClusters()).andReturn(clusters).anyTimes();
@@ -1362,7 +1362,7 @@ public class ClusterStackVersionResourceProviderTest {
 
 
     // add the property map to a set for the request.  add more maps for multiple creates
-    Map<String, Object> properties = new LinkedHashMap<String, Object>();
+    Map<String, Object> properties = new LinkedHashMap<>();
 
     // add properties to the request map
     properties.put(ClusterStackVersionResourceProvider.CLUSTER_STACK_VERSION_CLUSTER_NAME_PROPERTY_ID, clusterName);
@@ -1424,7 +1424,7 @@ public class ClusterStackVersionResourceProviderTest {
     repoVersion.setType(RepositoryType.STANDARD);
 
 
-    Map<String, Host> hostsForCluster = new HashMap<String, Host>();
+    Map<String, Host> hostsForCluster = new HashMap<>();
     int hostCount = 10;
     for (int i = 0; i < hostCount; i++) {
       String hostname = "host" + i;
@@ -1473,7 +1473,7 @@ public class ClusterStackVersionResourceProviderTest {
 
     AbstractControllerResourceProvider.init(resourceProviderFactory);
 
-    Map<String, Map<String, String>> hostConfigTags = new HashMap<String, Map<String, String>>();
+    Map<String, Map<String, String>> hostConfigTags = new HashMap<>();
     expect(configHelper.getEffectiveDesiredTags(anyObject(ClusterImpl.class), anyObject(String.class))).andReturn(hostConfigTags);
 
     expect(managementController.getClusters()).andReturn(clusters).anyTimes();
@@ -1556,7 +1556,7 @@ public class ClusterStackVersionResourceProviderTest {
     badRve.setVersion("2.2.1.0-1000");
     bad.setRepositoryVersion(badRve);
 
-    expect(clusterVersionDAO.findByCluster(anyObject(String.class))).andReturn(Collections.<ClusterVersionEntity>singletonList(bad)).once();
+    expect(clusterVersionDAO.findByCluster(anyObject(String.class))).andReturn(Collections.singletonList(bad)).once();
 
     // replay
     replay(managementController, response, clusters, resourceProviderFactory, csvResourceProvider,
@@ -1572,9 +1572,9 @@ public class ClusterStackVersionResourceProviderTest {
     injector.injectMembers(provider);
 
     // add the property map to a set for the request.  add more maps for multiple creates
-    Set<Map<String, Object>> propertySet = new LinkedHashSet<Map<String, Object>>();
+    Set<Map<String, Object>> propertySet = new LinkedHashSet<>();
 
-    Map<String, Object> properties = new LinkedHashMap<String, Object>();
+    Map<String, Object> properties = new LinkedHashMap<>();
 
     // add properties to the request map
     properties.put(ClusterStackVersionResourceProvider.CLUSTER_STACK_VERSION_CLUSTER_NAME_PROPERTY_ID, "Cluster100");
@@ -1638,7 +1638,7 @@ public class ClusterStackVersionResourceProviderTest {
     repoVersionEntity.setVersionXsd("version_definition.xsd");
     repoVersionEntity.setType(RepositoryType.STANDARD);
 
-    Map<String, Host> hostsForCluster = new HashMap<String, Host>();
+    Map<String, Host> hostsForCluster = new HashMap<>();
     List<HostVersionEntity> hostVersionEntitiesMergedWithNotRequired = new ArrayList<>();
     int hostCount = 10;
 
@@ -1759,9 +1759,9 @@ public class ClusterStackVersionResourceProviderTest {
 
     // add the property map to a set for the request. add more maps for multiple
     // creates
-    Set<Map<String, Object>> propertySet = new LinkedHashSet<Map<String, Object>>();
+    Set<Map<String, Object>> propertySet = new LinkedHashSet<>();
 
-    Map<String, Object> properties = new LinkedHashMap<String, Object>();
+    Map<String, Object> properties = new LinkedHashMap<>();
 
     // add properties to the request map
     properties.put(
@@ -1828,9 +1828,9 @@ public class ClusterStackVersionResourceProviderTest {
     injector.injectMembers(provider);
 
     // add the property map to a set for the request.  add more maps for multiple creates
-    Set<Map<String, Object>> propertySet = new LinkedHashSet<Map<String, Object>>();
+    Set<Map<String, Object>> propertySet = new LinkedHashSet<>();
 
-    Map<String, Object> properties = new LinkedHashMap<String, Object>();
+    Map<String, Object> properties = new LinkedHashMap<>();
 
     // add properties to the request map
     properties.put(ClusterStackVersionResourceProvider.CLUSTER_STACK_VERSION_CLUSTER_NAME_PROPERTY_ID, "Cluster100");

http://git-wip-us.apache.org/repos/asf/ambari/blob/e8080350/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/CompatibleRepositoryVersionResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/CompatibleRepositoryVersionResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/CompatibleRepositoryVersionResourceProviderTest.java
index bf1efb7..528bd40 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/CompatibleRepositoryVersionResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/CompatibleRepositoryVersionResourceProviderTest.java
@@ -117,7 +117,7 @@ public class CompatibleRepositoryVersionResourceProviderTest {
     final StackInfo stack1 = new StackInfo() {
       @Override
       public Map<String, UpgradePack> getUpgradePacks() {
-        Map<String, UpgradePack> map = new HashMap<String, UpgradePack>();
+        Map<String, UpgradePack> map = new HashMap<>();
 
         UpgradePack pack1 = new UpgradePack() {
 
@@ -191,7 +191,7 @@ public class CompatibleRepositoryVersionResourceProviderTest {
     final StackInfo stack2 = new StackInfo() {
       @Override
       public Map<String, UpgradePack> getUpgradePacks() {
-        Map<String, UpgradePack> map = new HashMap<String, UpgradePack>();
+        Map<String, UpgradePack> map = new HashMap<>();
 
         UpgradePack pack = new UpgradePack() {
           @Override

http://git-wip-us.apache.org/repos/asf/ambari/blob/e8080350/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ComponentResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ComponentResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ComponentResourceProviderTest.java
index c0f640b..7c34521 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ComponentResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ComponentResourceProviderTest.java
@@ -165,10 +165,10 @@ public class ComponentResourceProviderTest {
         managementController, maintenanceStateHelper);
 
     // add the property map to a set for the request.  add more maps for multiple creates
-    Set<Map<String, Object>> propertySet = new LinkedHashSet<Map<String, Object>>();
+    Set<Map<String, Object>> propertySet = new LinkedHashSet<>();
 
     // Service 1: create a map of properties for the request
-    Map<String, Object> properties = new LinkedHashMap<String, Object>();
+    Map<String, Object> properties = new LinkedHashMap<>();
 
     // add properties to the request map
     properties.put(ComponentResourceProvider.COMPONENT_CLUSTER_NAME_PROPERTY_ID, "Cluster100");
@@ -217,7 +217,7 @@ public class ComponentResourceProviderTest {
     StackId stackId = createNiceMock(StackId.class);
     final ComponentInfo componentInfo1 = createNiceMock(ComponentInfo.class);
     final ComponentInfo componentInfo2 = createNiceMock(ComponentInfo.class);
-    Map <String, Integer> serviceComponentStateCountMap = new HashMap <String, Integer>();
+    Map <String, Integer> serviceComponentStateCountMap = new HashMap<>();
     serviceComponentStateCountMap.put("startedCount", 1);
     serviceComponentStateCountMap.put("installedCount", 0);
     serviceComponentStateCountMap.put("installFailedCount", 0);
@@ -225,7 +225,7 @@ public class ComponentResourceProviderTest {
     serviceComponentStateCountMap.put("unknownCount", 1);
     serviceComponentStateCountMap.put("totalCount", 2);
 
-    Map<String, ServiceComponent> serviceComponentMap = new HashMap<String, ServiceComponent>();
+    Map<String, ServiceComponent> serviceComponentMap = new HashMap<>();
     serviceComponentMap.put("Component101", serviceComponent1);
     serviceComponentMap.put("Component102", serviceComponent2);
     serviceComponentMap.put("Component103", serviceComponent3);
@@ -272,7 +272,7 @@ public class ComponentResourceProviderTest {
         PropertyHelper.getKeyPropertyIds(type),
         managementController, maintenanceStateHelper);
 
-    Set<String> propertyIds = new HashSet<String>();
+    Set<String> propertyIds = new HashSet<>();
 
     propertyIds.add(ComponentResourceProvider.COMPONENT_CLUSTER_NAME_PROPERTY_ID);
     propertyIds.add(ComponentResourceProvider.COMPONENT_COMPONENT_NAME_PROPERTY_ID);
@@ -359,12 +359,12 @@ public class ComponentResourceProviderTest {
     RequestStatusResponse requestStatusResponse = createNiceMock(RequestStatusResponse.class);
     StackId stackId = createNiceMock(StackId.class);
 
-    Map<String, ServiceComponent> serviceComponentMap = new HashMap<String, ServiceComponent>();
+    Map<String, ServiceComponent> serviceComponentMap = new HashMap<>();
     serviceComponentMap.put("Component101", serviceComponent1);
     serviceComponentMap.put("Component102", serviceComponent2);
     serviceComponentMap.put("Component103", serviceComponent3);
 
-    Map <String, Integer> serviceComponentStateCountMap = new HashMap <String, Integer>();
+    Map <String, Integer> serviceComponentStateCountMap = new HashMap<>();
     serviceComponentStateCountMap.put("startedCount", 0);
     serviceComponentStateCountMap.put("installedCount", 1);
     serviceComponentStateCountMap.put("installFailedCount", 0);
@@ -439,7 +439,7 @@ public class ComponentResourceProviderTest {
     expect(managementController.createAndPersistStages(capture(clusterCapture), capture(requestPropertiesCapture), capture(requestParametersCapture), capture(changedServicesCapture), capture(changedCompsCapture), capture(changedScHostsCapture), capture(ignoredScHostsCapture), anyBoolean(), anyBoolean()
     )).andReturn(requestStatusResponse);
 
-    Map<String, String> mapRequestProps = new HashMap<String, String>();
+    Map<String, String> mapRequestProps = new HashMap<>();
     mapRequestProps.put("context", "Called from a test");
 
 
@@ -455,7 +455,7 @@ public class ComponentResourceProviderTest {
         PropertyHelper.getKeyPropertyIds(type),
         managementController, maintenanceStateHelper);
 
-    Map<String, Object> properties = new LinkedHashMap<String, Object>();
+    Map<String, Object> properties = new LinkedHashMap<>();
 
     properties.put(ComponentResourceProvider.COMPONENT_RECOVERY_ENABLED_ID, String.valueOf(true) /* recovery enabled */);
     properties.put(ComponentResourceProvider.COMPONENT_STATE_PROPERTY_ID, "STARTED");
@@ -679,10 +679,10 @@ public class ComponentResourceProviderTest {
     RequestStatusResponse requestStatusResponse = createNiceMock(RequestStatusResponse.class);
     StackId stackId = createMock(StackId.class);
 
-    Map<String, ServiceComponent> serviceComponentMap = new HashMap<String, ServiceComponent>();
+    Map<String, ServiceComponent> serviceComponentMap = new HashMap<>();
     serviceComponentMap.put("Component101", serviceComponent1);
 
-    Map <String, Integer> serviceComponentStateCountMap = new HashMap <String, Integer>();
+    Map <String, Integer> serviceComponentStateCountMap = new HashMap<>();
     serviceComponentStateCountMap.put("startedCount", 0);
     serviceComponentStateCountMap.put("installedCount", 1);
     serviceComponentStateCountMap.put("installFailedCount", 0);
@@ -745,7 +745,7 @@ public class ComponentResourceProviderTest {
     expect(managementController.createAndPersistStages(capture(clusterCapture), capture(requestPropertiesCapture), capture(requestParametersCapture), capture(changedServicesCapture), capture(changedCompsCapture), capture(changedScHostsCapture), capture(ignoredScHostsCapture), anyBoolean(), anyBoolean()
     )).andReturn(requestStatusResponse);
 
-    Map<String, String> mapRequestProps = new HashMap<String, String>();
+    Map<String, String> mapRequestProps = new HashMap<>();
     mapRequestProps.put("context", "Called from a test");
 
     // replay
@@ -759,7 +759,7 @@ public class ComponentResourceProviderTest {
         PropertyHelper.getKeyPropertyIds(type),
         managementController, maintenanceStateHelper);
 
-    Map<String, Object> properties = new LinkedHashMap<String, Object>();
+    Map<String, Object> properties = new LinkedHashMap<>();
 
     properties.put(ComponentResourceProvider.COMPONENT_RECOVERY_ENABLED_ID, String.valueOf(true) /* recovery enabled */);
 
@@ -794,7 +794,7 @@ public class ComponentResourceProviderTest {
     ServiceComponentRequest request1 = new ServiceComponentRequest("cluster1", "service1", "component1",
         null, String.valueOf(true /* recovery enabled */));
 
-    Set<ServiceComponentRequest> setRequests = new HashSet<ServiceComponentRequest>();
+    Set<ServiceComponentRequest> setRequests = new HashSet<>();
     setRequests.add(request1);
 
     // expectations
@@ -862,7 +862,7 @@ public class ComponentResourceProviderTest {
     ServiceComponentRequest request5 = new ServiceComponentRequest("cluster1", "service2", null, null,
               String.valueOf(true /* recovery enabled */));
 
-    Set<ServiceComponentRequest> setRequests = new HashSet<ServiceComponentRequest>();
+    Set<ServiceComponentRequest> setRequests = new HashSet<>();
     setRequests.add(request1);
     setRequests.add(request2);
     setRequests.add(request3);
@@ -946,7 +946,7 @@ public class ComponentResourceProviderTest {
     ServiceComponentRequest request1 = new ServiceComponentRequest("cluster1", "service1", "component1",
         null, String.valueOf(true /* recovery enabled */));
 
-    Set<ServiceComponentRequest> setRequests = new HashSet<ServiceComponentRequest>();
+    Set<ServiceComponentRequest> setRequests = new HashSet<>();
     setRequests.add(request1);
 
     // expectations

http://git-wip-us.apache.org/repos/asf/ambari/blob/e8080350/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProviderTest.java
index 671d0fd..5b69270 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProviderTest.java
@@ -187,20 +187,20 @@ public class ConfigGroupResourceProviderTest {
     ResourceProvider provider = getConfigGroupResourceProvider
         (managementController);
 
-    Set<Map<String, Object>> propertySet = new LinkedHashSet<Map<String, Object>>();
-    Map<String, Object> properties = new LinkedHashMap<String, Object>();
+    Set<Map<String, Object>> propertySet = new LinkedHashSet<>();
+    Map<String, Object> properties = new LinkedHashMap<>();
 
-    Set<Map<String, Object>> hostSet = new HashSet<Map<String, Object>>();
-    Map<String, Object> host1 = new HashMap<String, Object>();
+    Set<Map<String, Object>> hostSet = new HashSet<>();
+    Map<String, Object> host1 = new HashMap<>();
     host1.put(ConfigGroupResourceProvider.CONFIGGROUP_HOSTNAME_PROPERTY_ID, "h1");
     hostSet.add(host1);
-    Map<String, Object> host2 = new HashMap<String, Object>();
+    Map<String, Object> host2 = new HashMap<>();
     host2.put(ConfigGroupResourceProvider.CONFIGGROUP_HOSTNAME_PROPERTY_ID, "h2");
     hostSet.add(host2);
 
-    Set<Map<String, Object>> configSet = new HashSet<Map<String, Object>>();
-    Map<String, String> configMap = new HashMap<String, String>();
-    Map<String, Object> configs = new HashMap<String, Object>();
+    Set<Map<String, Object>> configSet = new HashSet<>();
+    Map<String, String> configMap = new HashMap<>();
+    Map<String, Object> configs = new HashMap<>();
     configs.put("type", "core-site");
     configs.put("tag", "version100");
     configMap.put("key1", "value1");
@@ -272,7 +272,7 @@ public class ConfigGroupResourceProviderTest {
     Cluster cluster = createNiceMock(Cluster.class);
     ConfigGroupFactory configGroupFactory = createNiceMock(ConfigGroupFactory.class);
     ConfigGroup configGroup = createNiceMock(ConfigGroup.class);
-    Map<Long, ConfigGroup> configGroupMap = new HashMap<Long, ConfigGroup>();
+    Map<Long, ConfigGroup> configGroupMap = new HashMap<>();
     configGroupMap.put(1L, configGroup);
 
     expect(managementController.getClusters()).andReturn(clusters).anyTimes();
@@ -296,8 +296,8 @@ public class ConfigGroupResourceProviderTest {
     ResourceProvider provider = getConfigGroupResourceProvider
         (managementController);
 
-    Map<String, Object> properties = new LinkedHashMap<String, Object>();
-    Set<Map<String, Object>> propertySet = new LinkedHashSet<Map<String, Object>>();
+    Map<String, Object> properties = new LinkedHashMap<>();
+    Set<Map<String, Object>> propertySet = new LinkedHashSet<>();
 
     properties.put(ConfigGroupResourceProvider
         .CONFIGGROUP_CLUSTER_NAME_PROPERTY_ID, "Cluster100");
@@ -369,7 +369,7 @@ public class ConfigGroupResourceProviderTest {
     expect(cluster.getConfigGroups()).andStubAnswer(new IAnswer<Map<Long, ConfigGroup>>() {
       @Override
       public Map<Long, ConfigGroup> answer() throws Throwable {
-        Map<Long, ConfigGroup> configGroupMap = new HashMap<Long, ConfigGroup>();
+        Map<Long, ConfigGroup> configGroupMap = new HashMap<>();
         configGroupMap.put(configGroup.getId(), configGroup);
         return configGroupMap;
       }
@@ -381,19 +381,19 @@ public class ConfigGroupResourceProviderTest {
     ResourceProvider provider = getConfigGroupResourceProvider
         (managementController);
 
-    Map<String, Object> properties = new LinkedHashMap<String, Object>();
+    Map<String, Object> properties = new LinkedHashMap<>();
 
-    Set<Map<String, Object>> hostSet = new HashSet<Map<String, Object>>();
-    Map<String, Object> host1 = new HashMap<String, Object>();
+    Set<Map<String, Object>> hostSet = new HashSet<>();
+    Map<String, Object> host1 = new HashMap<>();
     host1.put(ConfigGroupResourceProvider.CONFIGGROUP_HOSTNAME_PROPERTY_ID, "h1");
     hostSet.add(host1);
-    Map<String, Object> host2 = new HashMap<String, Object>();
+    Map<String, Object> host2 = new HashMap<>();
     host2.put(ConfigGroupResourceProvider.CONFIGGROUP_HOSTNAME_PROPERTY_ID, "h2");
     hostSet.add(host2);
 
-    Set<Map<String, Object>> configSet = new HashSet<Map<String, Object>>();
-    Map<String, String> configMap = new HashMap<String, String>();
-    Map<String, Object> configs = new HashMap<String, Object>();
+    Set<Map<String, Object>> configSet = new HashSet<>();
+    Map<String, String> configMap = new HashMap<>();
+    Map<String, Object> configs = new HashMap<>();
     configs.put("type", "core-site");
     configs.put("tag", "version100");
     configMap.put("key1", "value1");
@@ -411,7 +411,7 @@ public class ConfigGroupResourceProviderTest {
     properties.put(ConfigGroupResourceProvider.CONFIGGROUP_CONFIGS_PROPERTY_ID,
         configSet);
 
-    Map<String, String> mapRequestProps = new HashMap<String, String>();
+    Map<String, String> mapRequestProps = new HashMap<>();
     mapRequestProps.put("context", "Called from a test");
 
     Request request = PropertyHelper.getUpdateRequest(properties, mapRequestProps);
@@ -506,7 +506,7 @@ public class ConfigGroupResourceProviderTest {
     expect(cluster.getConfigGroups()).andStubAnswer(new IAnswer<Map<Long, ConfigGroup>>() {
       @Override
       public Map<Long, ConfigGroup> answer() throws Throwable {
-        Map<Long, ConfigGroup> configGroupMap = new HashMap<Long, ConfigGroup>();
+        Map<Long, ConfigGroup> configGroupMap = new HashMap<>();
         configGroupMap.put(configGroup.getId(), configGroup);
         return configGroupMap;
       }
@@ -518,19 +518,19 @@ public class ConfigGroupResourceProviderTest {
     ResourceProvider provider = getConfigGroupResourceProvider
         (managementController);
 
-    Map<String, Object> properties = new LinkedHashMap<String, Object>();
+    Map<String, Object> properties = new LinkedHashMap<>();
 
-    Set<Map<String, Object>> hostSet = new HashSet<Map<String, Object>>();
-    Map<String, Object> host1 = new HashMap<String, Object>();
+    Set<Map<String, Object>> hostSet = new HashSet<>();
+    Map<String, Object> host1 = new HashMap<>();
     host1.put(ConfigGroupResourceProvider.CONFIGGROUP_HOSTNAME_PROPERTY_ID, "h1");
     hostSet.add(host1);
-    Map<String, Object> host2 = new HashMap<String, Object>();
+    Map<String, Object> host2 = new HashMap<>();
     host2.put(ConfigGroupResourceProvider.CONFIGGROUP_HOSTNAME_PROPERTY_ID, "h2");
     hostSet.add(host2);
 
-    Set<Map<String, Object>> configSet = new HashSet<Map<String, Object>>();
-    Map<String, String> configMap = new HashMap<String, String>();
-    Map<String, Object> configs = new HashMap<String, Object>();
+    Set<Map<String, Object>> configSet = new HashSet<>();
+    Map<String, String> configMap = new HashMap<>();
+    Map<String, Object> configs = new HashMap<>();
     configs.put("type", "core-site");
     configs.put("tag", "version100");
     configMap.put("key1", "value1");
@@ -548,7 +548,7 @@ public class ConfigGroupResourceProviderTest {
     properties.put(ConfigGroupResourceProvider.CONFIGGROUP_CONFIGS_PROPERTY_ID,
         configSet);
 
-    Map<String, String> mapRequestProps = new HashMap<String, String>();
+    Map<String, String> mapRequestProps = new HashMap<>();
     mapRequestProps.put("context", "Called from a test");
 
     Request request = PropertyHelper.getUpdateRequest(properties, mapRequestProps);
@@ -625,13 +625,13 @@ public class ConfigGroupResourceProviderTest {
     ConfigGroupResponse response3 = createNiceMock(ConfigGroupResponse.class);
     ConfigGroupResponse response4 = createNiceMock(ConfigGroupResponse.class);
 
-    Map<Long, ConfigGroup> configGroupMap = new HashMap<Long, ConfigGroup>();
+    Map<Long, ConfigGroup> configGroupMap = new HashMap<>();
     configGroupMap.put(1L, configGroup1);
     configGroupMap.put(2L, configGroup2);
     configGroupMap.put(3L, configGroup3);
     configGroupMap.put(4L, configGroup4);
 
-    Map<Long, ConfigGroup> configGroupByHostname = new HashMap<Long, ConfigGroup>();
+    Map<Long, ConfigGroup> configGroupByHostname = new HashMap<>();
     configGroupByHostname.put(4L, configGroup4);
 
     expect(configGroup1.convertToResponse()).andReturn(response1).anyTimes();
@@ -653,7 +653,7 @@ public class ConfigGroupResourceProviderTest {
     expect(configGroup3.getTag()).andReturn("t3").anyTimes();
     expect(configGroup4.getTag()).andReturn("t4").anyTimes();
 
-    Map<Long, Host> hostMap = new HashMap<Long, Host>();
+    Map<Long, Host> hostMap = new HashMap<>();
     hostMap.put(host1Id, h1);
     expect(configGroup4.getHosts()).andReturn(hostMap).anyTimes();
 
@@ -670,8 +670,8 @@ public class ConfigGroupResourceProviderTest {
     expect(response3.getTag()).andReturn("t3").anyTimes();
     expect(cluster.getConfigGroupsByHostname("h1")).andReturn(configGroupByHostname).anyTimes();
 
-    Set<Map<String, Object>> hostObj = new HashSet<Map<String, Object>>();
-    Map<String, Object> hostnames = new HashMap<String, Object>();
+    Set<Map<String, Object>> hostObj = new HashSet<>();
+    Map<String, Object> hostnames = new HashMap<>();
     hostnames.put("host_name", "h1");
     hostObj.add(hostnames);
     expect(response4.getHosts()).andReturn(hostObj).anyTimes();
@@ -683,7 +683,7 @@ public class ConfigGroupResourceProviderTest {
 
     ResourceProvider resourceProvider = getConfigGroupResourceProvider(managementController);
 
-    Set<String> propertyIds = new HashSet<String>();
+    Set<String> propertyIds = new HashSet<>();
 
     propertyIds.add(ConfigGroupResourceProvider.CONFIGGROUP_CLUSTER_NAME_PROPERTY_ID);
     propertyIds.add(ConfigGroupResourceProvider.CONFIGGROUP_ID_PROPERTY_ID);
@@ -896,8 +896,8 @@ public class ConfigGroupResourceProviderTest {
     ConfigGroupResourceProvider resourceProvider = getConfigGroupResourceProvider
         (managementController);
 
-    Set<Map<String, String>> desiredConfigProperties = new HashSet<Map<String, String>>();
-    Map<String, String> desiredConfig1 = new HashMap<String, String>();
+    Set<Map<String, String>> desiredConfigProperties = new HashSet<>();
+    Map<String, String> desiredConfig1 = new HashMap<>();
     desiredConfig1.put("tag", "version2");
     desiredConfig1.put("type", "type1");
     desiredConfig1.put("properties/key1", "value1");
@@ -907,7 +907,7 @@ public class ConfigGroupResourceProviderTest {
     desiredConfig1.put("properties_attributes/attr2/key1", "15");
     desiredConfigProperties.add(desiredConfig1);
 
-    Map<String, Object> properties = new HashMap<String, Object>();
+    Map<String, Object> properties = new HashMap<>();
     properties.put("ConfigGroup/hosts", new HashMap<String, String>() {{
       put("host_name", "ambari1");
     }});

http://git-wip-us.apache.org/repos/asf/ambari/blob/e8080350/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ConfigurationResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ConfigurationResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ConfigurationResourceProviderTest.java
index 2f8c69f..c6b5c3a 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ConfigurationResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ConfigurationResourceProviderTest.java
@@ -82,9 +82,9 @@ public class ConfigurationResourceProviderTest {
     ConfigurationResourceProvider provider = new ConfigurationResourceProvider(
         managementController);
 
-    Set<Map<String, Object>> propertySet = new LinkedHashSet<Map<String, Object>>();
+    Set<Map<String, Object>> propertySet = new LinkedHashSet<>();
 
-    Map<String, Object> properties = new LinkedHashMap<String, Object>();
+    Map<String, Object> properties = new LinkedHashMap<>();
 
     properties.put(ConfigurationResourceProvider.CONFIGURATION_CLUSTER_NAME_PROPERTY_ID, "Cluster100");
     properties.put(ConfigurationResourceProvider.CONFIGURATION_CONFIG_TAG_PROPERTY_ID, "tag");
@@ -129,9 +129,9 @@ public class ConfigurationResourceProviderTest {
     ConfigurationResourceProvider provider = new ConfigurationResourceProvider(
         managementController);
 
-    Set<Map<String, Object>> propertySet = new LinkedHashSet<Map<String, Object>>();
+    Set<Map<String, Object>> propertySet = new LinkedHashSet<>();
 
-    Map<String, Object> properties = new LinkedHashMap<String, Object>();
+    Map<String, Object> properties = new LinkedHashMap<>();
 
     properties.put(ConfigurationResourceProvider.CONFIGURATION_CLUSTER_NAME_PROPERTY_ID, "Cluster100");
     properties.put(ConfigurationResourceProvider.CONFIGURATION_CONFIG_TAG_PROPERTY_ID, "tag");
@@ -157,7 +157,7 @@ public class ConfigurationResourceProviderTest {
 
     AmbariManagementController managementController = createMock(AmbariManagementController.class);
 
-    Set<ConfigurationResponse> allResponse = new HashSet<ConfigurationResponse>();
+    Set<ConfigurationResponse> allResponse = new HashSet<>();
     allResponse.add(new ConfigurationResponse("Cluster100", stackId, "type",
         "tag1", 1L, null, null));
     allResponse.add(new ConfigurationResponse("Cluster100", stackId, "type",
@@ -165,7 +165,7 @@ public class ConfigurationResourceProviderTest {
     allResponse.add(new ConfigurationResponse("Cluster100", stackId, "type",
         "tag3", 3L, null, null));
 
-    Set<ConfigurationResponse> orResponse = new HashSet<ConfigurationResponse>();
+    Set<ConfigurationResponse> orResponse = new HashSet<>();
     orResponse.add(new ConfigurationResponse("Cluster100", stackId, "type",
         "tag1", 1L, null, null));
     orResponse.add(new ConfigurationResponse("Cluster100", stackId, "type",
@@ -192,7 +192,7 @@ public class ConfigurationResourceProviderTest {
         PropertyHelper.getKeyPropertyIds(type),
         managementController);
 
-    Set<String> propertyIds = new HashSet<String>();
+    Set<String> propertyIds = new HashSet<>();
 
     propertyIds.add(ConfigurationResourceProvider.CONFIGURATION_CLUSTER_NAME_PROPERTY_ID);
     propertyIds.add(ConfigurationResourceProvider.CONFIGURATION_CONFIG_TAG_PROPERTY_ID);
@@ -302,7 +302,7 @@ public class ConfigurationResourceProviderTest {
         managementController);
 
     // add the property map to a set for the request.
-    Map<String, Object> properties = new LinkedHashMap<String, Object>();
+    Map<String, Object> properties = new LinkedHashMap<>();
 
     // create the request
     Request request = PropertyHelper.getUpdateRequest(properties, null);

http://git-wip-us.apache.org/repos/asf/ambari/blob/e8080350/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/CredentialResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/CredentialResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/CredentialResourceProviderTest.java
index 3116a80..7cc6702 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/CredentialResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/CredentialResourceProviderTest.java
@@ -611,7 +611,7 @@ public class CredentialResourceProviderTest {
     injector.injectMembers(credentialResourceProvider);
 
     // Create resources requests
-    Set<Map<String, Object>> properties = new HashSet<Map<String, Object>>();
+    Set<Map<String, Object>> properties = new HashSet<>();
     properties.addAll(getCredentialTestProperties("c1", "alias1", "username1", "password1", CredentialStoreType.TEMPORARY));
     properties.addAll(getCredentialTestProperties("c1", "alias2", "username2", "password2", CredentialStoreType.TEMPORARY));
     properties.addAll(getCredentialTestProperties("c1", "alias3", "username3", "password3", CredentialStoreType.TEMPORARY));
@@ -705,7 +705,7 @@ public class CredentialResourceProviderTest {
     injector.injectMembers(credentialResourceProvider);
 
     // Create resources requests
-    Set<Map<String, Object>> properties = new HashSet<Map<String, Object>>();
+    Set<Map<String, Object>> properties = new HashSet<>();
     properties.addAll(getCredentialTestProperties("c1", "alias1", "username1", "password1", CredentialStoreType.TEMPORARY));
     properties.addAll(getCredentialTestProperties("c1", "alias2", "username2", "password2", CredentialStoreType.TEMPORARY));
     properties.addAll(getCredentialTestProperties("c1", "alias3", "username3", "password3", CredentialStoreType.TEMPORARY));
@@ -776,7 +776,7 @@ public class CredentialResourceProviderTest {
     injector.injectMembers(credentialResourceProvider);
 
     // Create resources requests
-    Set<Map<String, Object>> properties = new HashSet<Map<String, Object>>();
+    Set<Map<String, Object>> properties = new HashSet<>();
     properties.addAll(getCredentialTestProperties("c1", "alias1", "username1", "password1", CredentialStoreType.TEMPORARY));
     properties.addAll(getCredentialTestProperties("c1", "alias2", "username2", "password2", CredentialStoreType.TEMPORARY));
     properties.addAll(getCredentialTestProperties("c1", "alias3", "username3", "password3", CredentialStoreType.TEMPORARY));
@@ -838,7 +838,7 @@ public class CredentialResourceProviderTest {
   }
 
   private Set<Map<String, Object>> getCredentialTestProperties(String clusterName, String alias, String principal, String password, CredentialStoreType credentialStoreType) {
-    Map<String, Object> mapProperties = new HashMap<String, Object>();
+    Map<String, Object> mapProperties = new HashMap<>();
 
     if (clusterName != null) {
       mapProperties.put(CredentialResourceProvider.CREDENTIAL_CLUSTER_NAME_PROPERTY_ID, clusterName);

http://git-wip-us.apache.org/repos/asf/ambari/blob/e8080350/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ExportBlueprintRequestTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ExportBlueprintRequestTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ExportBlueprintRequestTest.java
index b4292e6..f6dabda 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ExportBlueprintRequestTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ExportBlueprintRequestTest.java
@@ -90,7 +90,7 @@ public class ExportBlueprintRequestTest {
     clusterResource.setProperty(ClusterResourceProvider.CLUSTER_ID_PROPERTY_ID, CLUSTER_ID);
     clusterResource.setProperty(ClusterResourceProvider.CLUSTER_VERSION_PROPERTY_ID, "TEST-1.0");
 
-    TreeNode<Resource> clusterNode = new TreeNodeImpl<Resource>(null, clusterResource, "cluster");
+    TreeNode<Resource> clusterNode = new TreeNodeImpl<>(null, clusterResource, "cluster");
     // add empty config child resource
     Resource configResource = new ResourceImpl(Resource.Type.Configuration);
     clusterNode.addChild(configResource, "configurations");

http://git-wip-us.apache.org/repos/asf/ambari/blob/e8080350/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ExtensionResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ExtensionResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ExtensionResourceProviderTest.java
index dd2898d..08cb322 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ExtensionResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/ExtensionResourceProviderTest.java
@@ -47,7 +47,7 @@ public class ExtensionResourceProviderTest {
 
     AmbariManagementController managementController = createMock(AmbariManagementController.class);
 
-    Set<ExtensionResponse> allResponse = new HashSet<ExtensionResponse>();
+    Set<ExtensionResponse> allResponse = new HashSet<>();
     allResponse.add(new ExtensionResponse("Extension1"));
     allResponse.add(new ExtensionResponse("Extension2"));
 
@@ -63,7 +63,7 @@ public class ExtensionResourceProviderTest {
         PropertyHelper.getKeyPropertyIds(type),
         managementController);
 
-    Set<String> propertyIds = new HashSet<String>();
+    Set<String> propertyIds = new HashSet<>();
 
     propertyIds.add(ExtensionResourceProvider.EXTENSION_NAME_PROPERTY_ID);
 
@@ -76,7 +76,7 @@ public class ExtensionResourceProviderTest {
     Assert.assertEquals(2, resources.size());
 
 
-    Set<String> extensionNames = new HashSet<String>();
+    Set<String> extensionNames = new HashSet<>();
     extensionNames.add("Extension1");
     extensionNames.add("Extension2");
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/e8080350/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/FeedResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/FeedResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/FeedResourceProviderTest.java
index 5560364..5b94b3c 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/FeedResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/FeedResourceProviderTest.java
@@ -50,9 +50,9 @@ public class FeedResourceProviderTest {
   public void testCreateResources() throws Exception {
     IvoryService service = createMock(IvoryService.class);
 
-    Set<Map<String, Object>> propertySet = new HashSet<Map<String, Object>>();
+    Set<Map<String, Object>> propertySet = new HashSet<>();
 
-    Map<String, Object> properties = new HashMap<String, Object>();
+    Map<String, Object> properties = new HashMap<>();
 
     properties.put(FeedResourceProvider.FEED_NAME_PROPERTY_ID, "Feed1");
     properties.put(FeedResourceProvider.FEED_DESCRIPTION_PROPERTY_ID, "desc");
@@ -85,16 +85,16 @@ public class FeedResourceProviderTest {
   public void testGetResources() throws Exception {
     IvoryService service = createMock(IvoryService.class);
 
-    Set<Map<String, Object>> propertySet = new HashSet<Map<String, Object>>();
+    Set<Map<String, Object>> propertySet = new HashSet<>();
 
-    Map<String, Object> properties = new HashMap<String, Object>();
+    Map<String, Object> properties = new HashMap<>();
 
-    List<String> feedNames = new LinkedList<String>();
+    List<String> feedNames = new LinkedList<>();
     feedNames.add("Feed1");
     feedNames.add("Feed2");
     feedNames.add("Feed3");
 
-    Map<String,String> props = new HashMap<String, String>();
+    Map<String,String> props = new HashMap<>();
 
     Feed feed1 = new Feed("Feed1", "d", "s", "sch", "source", "st", "end", "l", "a", "target", "st", "end", "l", "a", props);
     Feed feed2 = new Feed("Feed2", "d", "s", "sch", "source", "st", "end", "l", "a", "target", "st", "end", "l", "a", props);
@@ -130,9 +130,9 @@ public class FeedResourceProviderTest {
   public void testUpdateResources() throws Exception {
     IvoryService service = createMock(IvoryService.class);
 
-    Set<Map<String, Object>> propertySet = new HashSet<Map<String, Object>>();
+    Set<Map<String, Object>> propertySet = new HashSet<>();
 
-    Map<String, Object> properties = new HashMap<String, Object>();
+    Map<String, Object> properties = new HashMap<>();
 
     properties.put(FeedResourceProvider.FEED_NAME_PROPERTY_ID, "Feed1");
     properties.put(FeedResourceProvider.FEED_DESCRIPTION_PROPERTY_ID, "desc");
@@ -141,10 +141,10 @@ public class FeedResourceProviderTest {
     properties.put(FeedResourceProvider.FEED_SOURCE_CLUSTER_NAME_PROPERTY_ID, "source");
     properties.put(FeedResourceProvider.FEED_TARGET_CLUSTER_NAME_PROPERTY_ID, "target");
 
-    List<String> feedNames = new LinkedList<String>();
+    List<String> feedNames = new LinkedList<>();
     feedNames.add("Feed1");
 
-    Map<String,String> props = new HashMap<String, String>();
+    Map<String,String> props = new HashMap<>();
 
     Feed feed1 = new Feed("Feed1", "desc", "WAITING", "sched", "source", "st", "end", "l", "a", "target", "st", "end", "l", "a", props);
 
@@ -176,10 +176,10 @@ public class FeedResourceProviderTest {
   public void testDeleteResources() throws Exception {
     IvoryService service = createMock(IvoryService.class);
 
-    List<String> feedNames = new LinkedList<String>();
+    List<String> feedNames = new LinkedList<>();
     feedNames.add("Feed1");
 
-    Map<String,String> props = new HashMap<String, String>();
+    Map<String,String> props = new HashMap<>();
 
     Feed feed1 = new Feed("Feed1", "d", "s", "sch", "source", "st", "end", "l", "a", "target", "st", "end", "l", "a", props);
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/e8080350/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/GroupPrivilegeResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/GroupPrivilegeResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/GroupPrivilegeResourceProviderTest.java
index ebe92e4..10433b5 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/GroupPrivilegeResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/GroupPrivilegeResourceProviderTest.java
@@ -326,7 +326,7 @@ public class GroupPrivilegeResourceProviderTest extends AbstractPrivilegeResourc
     final TestUsers users = new TestUsers();
     users.setPrivilegeDAO(privilegeDAO);
 
-    List<PrincipalEntity> groupPrincipals = new LinkedList<PrincipalEntity>();
+    List<PrincipalEntity> groupPrincipals = new LinkedList<>();
     groupPrincipals.add(principalEntity);
 
     expect(privilegeDAO.findAllByPrincipal(groupPrincipals)).
@@ -348,7 +348,7 @@ public class GroupPrivilegeResourceProviderTest extends AbstractPrivilegeResourc
 
     GroupPrivilegeResourceProvider.init(clusterDAO, groupDAO, viewInstanceDAO, users);
 
-    final Set<String> propertyIds = new HashSet<String>();
+    final Set<String> propertyIds = new HashSet<>();
     propertyIds.add(GroupPrivilegeResourceProvider.PRIVILEGE_GROUP_NAME_PROPERTY_ID);
 
     final Predicate predicate = new PredicateBuilder()

http://git-wip-us.apache.org/repos/asf/ambari/blob/e8080350/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/GroupResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/GroupResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/GroupResourceProviderTest.java
index 90e86a7..bbfa2d8 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/GroupResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/GroupResourceProviderTest.java
@@ -88,9 +88,9 @@ public class GroupResourceProviderTest {
         managementController);
 
     // add the property map to a set for the request.  add more maps for multiple creates
-    Set<Map<String, Object>> propertySet = new LinkedHashSet<Map<String, Object>>();
+    Set<Map<String, Object>> propertySet = new LinkedHashSet<>();
 
-    Map<String, Object> properties = new LinkedHashMap<String, Object>();
+    Map<String, Object> properties = new LinkedHashMap<>();
 
     // add properties to the request map
     properties.put(GroupResourceProvider.GROUP_GROUPNAME_PROPERTY_ID, "engineering");
@@ -121,7 +121,7 @@ public class GroupResourceProviderTest {
 
     AmbariManagementController managementController = createMock(AmbariManagementController.class);
 
-    Set<GroupResponse> allResponse = new HashSet<GroupResponse>();
+    Set<GroupResponse> allResponse = new HashSet<>();
     allResponse.add(new GroupResponse("engineering", false));
 
     // set expectations
@@ -139,7 +139,7 @@ public class GroupResourceProviderTest {
         PropertyHelper.getKeyPropertyIds(type),
         managementController);
 
-    Set<String> propertyIds = new HashSet<String>();
+    Set<String> propertyIds = new HashSet<>();
 
     propertyIds.add(GroupResourceProvider.GROUP_GROUPNAME_PROPERTY_ID);
 
@@ -190,7 +190,7 @@ public class GroupResourceProviderTest {
         PropertyHelper.getKeyPropertyIds(type),
         managementController);
 
-    Map<String, Object> properties = new LinkedHashMap<String, Object>();
+    Map<String, Object> properties = new LinkedHashMap<>();
     Request request = PropertyHelper.getUpdateRequest(properties, null);
     Predicate predicate = new PredicateBuilder().property(GroupResourceProvider.GROUP_GROUPNAME_PROPERTY_ID).
         equals("engineering").toPredicate();

http://git-wip-us.apache.org/repos/asf/ambari/blob/e8080350/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostComponentResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostComponentResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostComponentResourceProviderTest.java
index ec9da09..a2b0a0c 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostComponentResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostComponentResourceProviderTest.java
@@ -134,10 +134,10 @@ public class HostComponentResourceProviderTest {
         managementController);
 
     // add the property map to a set for the request.  add more maps for multiple creates
-    Set<Map<String, Object>> propertySet = new LinkedHashSet<Map<String, Object>>();
+    Set<Map<String, Object>> propertySet = new LinkedHashSet<>();
 
     // Service 1: create a map of properties for the request
-    Map<String, Object> properties = new LinkedHashMap<String, Object>();
+    Map<String, Object> properties = new LinkedHashMap<>();
 
     // add properties to the request map
     properties.put(HostComponentResourceProvider.HOST_COMPONENT_CLUSTER_NAME_PROPERTY_ID, "Cluster100");
@@ -180,7 +180,7 @@ public class HostComponentResourceProviderTest {
 
     AbstractControllerResourceProvider.init(resourceProviderFactory);
 
-    Set<ServiceComponentHostResponse> allResponse = new HashSet<ServiceComponentHostResponse>();
+    Set<ServiceComponentHostResponse> allResponse = new HashSet<>();
     StackId stackId = new StackId("HDP-0.1");
     StackId stackId2 = new StackId("HDP-0.2");
     allResponse.add(new ServiceComponentHostResponse(
@@ -193,7 +193,7 @@ public class HostComponentResourceProviderTest {
     allResponse.add(new ServiceComponentHostResponse(
         "Cluster100", "Service100", "Component102", "Component 102", "Host100","Host100", State.INSTALLED.toString(), stackId.getStackId(), State.STARTED.toString(),
         stackId2.getStackId(), null));
-    Map<String, String> expectedNameValues = new HashMap<String, String>();
+    Map<String, String> expectedNameValues = new HashMap<>();
     expectedNameValues.put(
         HostComponentResourceProvider.HOST_COMPONENT_CLUSTER_NAME_PROPERTY_ID, "Cluster100");
     expectedNameValues.put(
@@ -214,7 +214,7 @@ public class HostComponentResourceProviderTest {
         eq(managementController))).
         andReturn(hostComponentResourceProvider).anyTimes();
 
-    Set<String> propertyIds = new HashSet<String>();
+    Set<String> propertyIds = new HashSet<>();
 
     propertyIds.add(HostComponentResourceProvider.HOST_COMPONENT_CLUSTER_NAME_PROPERTY_ID);
     propertyIds.add(HostComponentResourceProvider.HOST_COMPONENT_COMPONENT_NAME_PROPERTY_ID);
@@ -227,7 +227,7 @@ public class HostComponentResourceProviderTest {
         HostComponentResourceProvider.HOST_COMPONENT_CLUSTER_NAME_PROPERTY_ID).equals("Cluster100").toPredicate();
     Request request = PropertyHelper.getReadRequest(propertyIds);
 
-    Set<Resource> hostsComponentResources = new HashSet<Resource>();
+    Set<Resource> hostsComponentResources = new HashSet<>();
 
     Resource hostsComponentResource1 = new ResourceImpl(Resource.Type.HostComponent);
     hostsComponentResource1.setProperty(HostComponentResourceProvider.HOST_COMPONENT_CLUSTER_NAME_PROPERTY_ID, "Cluster100");
@@ -283,7 +283,7 @@ public class HostComponentResourceProviderTest {
     Set<Resource> resources = provider.getResources(request, predicate);
 
     Assert.assertEquals(3, resources.size());
-    Set<String> names = new HashSet<String>();
+    Set<String> names = new HashSet<>();
     for (Resource resource : resources) {
       for (String key : expectedNameValues.keySet()) {
         Assert.assertEquals(expectedNameValues.get(key), resource.getPropertyValue(key));
@@ -332,10 +332,10 @@ public class HostComponentResourceProviderTest {
     MaintenanceStateHelper maintenanceStateHelper = createNiceMock(MaintenanceStateHelper.class);
 
 
-    Map<String, String> mapRequestProps = new HashMap<String, String>();
+    Map<String, String> mapRequestProps = new HashMap<>();
     mapRequestProps.put("context", "Called from a test");
 
-    Set<ServiceComponentHostResponse> nameResponse = new HashSet<ServiceComponentHostResponse>();
+    Set<ServiceComponentHostResponse> nameResponse = new HashSet<>();
     nameResponse.add(new ServiceComponentHostResponse(
         "Cluster102", "Service100", "Component100", "Component 100", "Host100", "Host100","INSTALLED", "", "", "", null));
 
@@ -358,8 +358,8 @@ public class HostComponentResourceProviderTest {
     expect(managementController.getHostComponents(
         EasyMock.<Set<ServiceComponentHostRequest>>anyObject())).andReturn(nameResponse).once();
 
-    Map<String, Map<State, List<ServiceComponentHost>>> changedHosts = new HashMap<String, Map<State, List<ServiceComponentHost>>>();
-    List<ServiceComponentHost> changedComponentHosts = new ArrayList<ServiceComponentHost>();
+    Map<String, Map<State, List<ServiceComponentHost>>> changedHosts = new HashMap<>();
+    List<ServiceComponentHost> changedComponentHosts = new ArrayList<>();
     changedComponentHosts.add(componentHost);
     changedHosts.put("Component100", Collections.singletonMap(State.STARTED, changedComponentHosts));
 
@@ -387,7 +387,7 @@ public class HostComponentResourceProviderTest {
 
     SecurityContextHolder.getContext().setAuthentication(authentication);
 
-    Map<String, Object> properties = new LinkedHashMap<String, Object>();
+    Map<String, Object> properties = new LinkedHashMap<>();
 
     properties.put(HostComponentResourceProvider.HOST_COMPONENT_STATE_PROPERTY_ID, "STARTED");
 
@@ -471,7 +471,7 @@ public class HostComponentResourceProviderTest {
 
   @Test
   public void testCheckPropertyIds() throws Exception {
-    Set<String> propertyIds = new HashSet<String>();
+    Set<String> propertyIds = new HashSet<>();
     propertyIds.add("foo");
     propertyIds.add("cat1/foo");
     propertyIds.add("cat2/bar");
@@ -480,7 +480,7 @@ public class HostComponentResourceProviderTest {
     propertyIds.add("cat4/sub2/sub3/bat");
     propertyIds.add("cat5/subcat5/map");
 
-    Map<Resource.Type, String> keyPropertyIds = new HashMap<Resource.Type, String>();
+    Map<Resource.Type, String> keyPropertyIds = new HashMap<>();
 
     AmbariManagementController managementController = createMock(AmbariManagementController.class);
     Injector injector = createNiceMock(Injector.class);
@@ -533,10 +533,10 @@ public class HostComponentResourceProviderTest {
     MaintenanceStateHelper maintenanceStateHelper = createNiceMock(MaintenanceStateHelper.class);
 
 
-    Map<String, String> mapRequestProps = new HashMap<String, String>();
+    Map<String, String> mapRequestProps = new HashMap<>();
     mapRequestProps.put("context", "Called from a test");
 
-    Set<ServiceComponentHostResponse> nameResponse = new HashSet<ServiceComponentHostResponse>();
+    Set<ServiceComponentHostResponse> nameResponse = new HashSet<>();
     nameResponse.add(new ServiceComponentHostResponse(
         "Cluster102", "Service100", "Component100", "Component 100", "Host100", "Host100","INSTALLED", "", "", "", null));
 
@@ -557,8 +557,8 @@ public class HostComponentResourceProviderTest {
     expect(managementController.getHostComponents(
         EasyMock.<Set<ServiceComponentHostRequest>>anyObject())).andReturn(Collections.<ServiceComponentHostResponse>emptySet()).once();
 
-    Map<String, Map<State, List<ServiceComponentHost>>> changedHosts = new HashMap<String, Map<State, List<ServiceComponentHost>>>();
-    List<ServiceComponentHost> changedComponentHosts = new ArrayList<ServiceComponentHost>();
+    Map<String, Map<State, List<ServiceComponentHost>>> changedHosts = new HashMap<>();
+    List<ServiceComponentHost> changedComponentHosts = new ArrayList<>();
     changedComponentHosts.add(componentHost);
     changedHosts.put("Component100", Collections.singletonMap(State.STARTED, changedComponentHosts));
 
@@ -580,7 +580,7 @@ public class HostComponentResourceProviderTest {
 
     SecurityContextHolder.getContext().setAuthentication(authentication);
 
-    Map<String, Object> properties = new LinkedHashMap<String, Object>();
+    Map<String, Object> properties = new LinkedHashMap<>();
 
     properties.put(HostComponentResourceProvider.HOST_COMPONENT_STATE_PROPERTY_ID, "STARTED");
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/e8080350/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostKerberosIdentityResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostKerberosIdentityResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostKerberosIdentityResourceProviderTest.java
index 5622df0..9c94f35 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostKerberosIdentityResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostKerberosIdentityResourceProviderTest.java
@@ -76,12 +76,12 @@ public class HostKerberosIdentityResourceProviderTest extends EasyMockSupport {
 
     AmbariManagementController managementController = createMock(AmbariManagementController.class);
 
-    Map<String, String> mapRequestProps = new HashMap<String, String>();
+    Map<String, String> mapRequestProps = new HashMap<>();
     mapRequestProps.put("context", "Called from a test");
 
     ResourceProvider provider = new HostKerberosIdentityResourceProvider(managementController);
 
-    Map<String, Object> properties = new LinkedHashMap<String, Object>();
+    Map<String, Object> properties = new LinkedHashMap<>();
 
     properties.put(HostKerberosIdentityResourceProvider.KERBEROS_IDENTITY_CLUSTER_NAME_PROPERTY_ID, "Cluster100");
     properties.put(HostKerberosIdentityResourceProvider.KERBEROS_IDENTITY_HOST_NAME_PROPERTY_ID, "Host100");
@@ -198,14 +198,14 @@ public class HostKerberosIdentityResourceProviderTest extends EasyMockSupport {
     HostDAO hostDAO = createStrictMock(HostDAO.class);
     expect(hostDAO.findByName("Host100")).andReturn(host100).times(1);
 
-    Collection<KerberosIdentityDescriptor> identities = new ArrayList<KerberosIdentityDescriptor>();
+    Collection<KerberosIdentityDescriptor> identities = new ArrayList<>();
     identities.add(identity1);
     identities.add(identity2);
     identities.add(identity3);
     identities.add(identity4);
     identities.add(identity5);
 
-    Map<String, Collection<KerberosIdentityDescriptor>> activeIdentities = new HashMap<String, Collection<KerberosIdentityDescriptor>>();
+    Map<String, Collection<KerberosIdentityDescriptor>> activeIdentities = new HashMap<>();
     activeIdentities.put("Host100", identities);
 
     KerberosHelper kerberosHelper = createStrictMock(KerberosHelper.class);
@@ -236,7 +236,7 @@ public class HostKerberosIdentityResourceProviderTest extends EasyMockSupport {
     field.setAccessible(true);
     field.set(provider, hostDAO);
 
-    Set<String> propertyIds = new HashSet<String>();
+    Set<String> propertyIds = new HashSet<>();
 
     propertyIds.add(HostKerberosIdentityResourceProvider.KERBEROS_IDENTITY_CLUSTER_NAME_PROPERTY_ID);
     propertyIds.add(HostKerberosIdentityResourceProvider.KERBEROS_IDENTITY_HOST_NAME_PROPERTY_ID);

http://git-wip-us.apache.org/repos/asf/ambari/blob/e8080350/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostResourceProviderTest.java
index 0c6e6cc..ac6ac1d 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/HostResourceProviderTest.java
@@ -156,9 +156,9 @@ public class HostResourceProviderTest extends EasyMockSupport {
         managementController);
 
     // add the property map to a set for the request.  add more maps for multiple creates
-    Set<Map<String, Object>> propertySet = new LinkedHashSet<Map<String, Object>>();
+    Set<Map<String, Object>> propertySet = new LinkedHashSet<>();
 
-    Map<String, Object> properties = new LinkedHashMap<String, Object>();
+    Map<String, Object> properties = new LinkedHashMap<>();
 
     // add properties to the request map
     properties.put(HostResourceProvider.HOST_CLUSTER_NAME_PROPERTY_ID, "Cluster100");
@@ -207,12 +207,12 @@ public class HostResourceProviderTest extends EasyMockSupport {
 
     AbstractControllerResourceProvider.init(resourceProviderFactory);
 
-    List<Host> hosts = new LinkedList<Host>();
+    List<Host> hosts = new LinkedList<>();
     hosts.add(host100);
     hosts.add(host101);
     hosts.add(host102);
 
-    Set<Cluster> clusterSet = new HashSet<Cluster>();
+    Set<Cluster> clusterSet = new HashSet<>();
     clusterSet.add(cluster);
 
     // set expectations
@@ -241,7 +241,7 @@ public class HostResourceProviderTest extends EasyMockSupport {
     expect(healthStatus.getHealthStatus()).andReturn(HostHealthStatus.HealthStatus.HEALTHY).anyTimes();
     expect(healthStatus.getHealthReport()).andReturn("HEALTHY").anyTimes();
 
-    Set<String> propertyIds = new HashSet<String>();
+    Set<String> propertyIds = new HashSet<>();
 
     propertyIds.add(HostResourceProvider.HOST_CLUSTER_NAME_PROPERTY_ID);
     propertyIds.add(HostResourceProvider.HOST_NAME_PROPERTY_ID);
@@ -297,7 +297,7 @@ public class HostResourceProviderTest extends EasyMockSupport {
 
     AbstractControllerResourceProvider.init(resourceProviderFactory);
 
-    Set<Cluster> clusterSet = new HashSet<Cluster>();
+    Set<Cluster> clusterSet = new HashSet<>();
     clusterSet.add(cluster);
 
     ServiceComponentHostResponse shr1 = new ServiceComponentHostResponse("Cluster100", "Service100", "Component100", "Component 100",
@@ -307,7 +307,7 @@ public class HostResourceProviderTest extends EasyMockSupport {
     ServiceComponentHostResponse shr3 = new ServiceComponentHostResponse("Cluster100", "Service100", "Component103", "Component 103",
         "Host100", "Host100", "STARTED", "", null, null, null);
 
-    Set<ServiceComponentHostResponse> responses = new HashSet<ServiceComponentHostResponse>();
+    Set<ServiceComponentHostResponse> responses = new HashSet<>();
     responses.add(shr1);
     responses.add(shr2);
     responses.add(shr3);
@@ -345,7 +345,7 @@ public class HostResourceProviderTest extends EasyMockSupport {
         EasyMock.<Map<Resource.Type, String>>anyObject(),
         eq(managementController))).andReturn(hostResourceProvider).anyTimes();
 
-    Set<String> propertyIds = new HashSet<String>();
+    Set<String> propertyIds = new HashSet<>();
 
     propertyIds.add(HostResourceProvider.HOST_CLUSTER_NAME_PROPERTY_ID);
     propertyIds.add(HostResourceProvider.HOST_NAME_PROPERTY_ID);
@@ -398,7 +398,7 @@ public class HostResourceProviderTest extends EasyMockSupport {
 
     AbstractControllerResourceProvider.init(resourceProviderFactory);
 
-    Set<Cluster> clusterSet = new HashSet<Cluster>();
+    Set<Cluster> clusterSet = new HashSet<>();
     clusterSet.add(cluster);
 
     ServiceComponentHostResponse shr1 = new ServiceComponentHostResponse("Cluster100", "Service100", "Component100", "Component 100",
@@ -408,7 +408,7 @@ public class HostResourceProviderTest extends EasyMockSupport {
     ServiceComponentHostResponse shr3 = new ServiceComponentHostResponse("Cluster100", "Service100", "Component103", "Component 103",
         "Host100", "Host100", "STARTED", "", null, null, null);
 
-    Set<ServiceComponentHostResponse> responses = new HashSet<ServiceComponentHostResponse>();
+    Set<ServiceComponentHostResponse> responses = new HashSet<>();
     responses.add(shr1);
     responses.add(shr2);
     responses.add(shr3);
@@ -440,7 +440,7 @@ public class HostResourceProviderTest extends EasyMockSupport {
         EasyMock.<Map<Resource.Type, String>>anyObject(),
         eq(managementController))).andReturn(hostResourceProvider).anyTimes();
 
-    Set<String> propertyIds = new HashSet<String>();
+    Set<String> propertyIds = new HashSet<>();
 
     propertyIds.add(HostResourceProvider.HOST_CLUSTER_NAME_PROPERTY_ID);
     propertyIds.add(HostResourceProvider.HOST_NAME_PROPERTY_ID);
@@ -494,7 +494,7 @@ public class HostResourceProviderTest extends EasyMockSupport {
 
     AbstractControllerResourceProvider.init(resourceProviderFactory);
 
-    Set<Cluster> clusterSet = new HashSet<Cluster>();
+    Set<Cluster> clusterSet = new HashSet<>();
     clusterSet.add(cluster);
 
     ServiceComponentHostResponse shr1 = new ServiceComponentHostResponse("Cluster100", "Service100", "Component100", "Component 100",
@@ -504,7 +504,7 @@ public class HostResourceProviderTest extends EasyMockSupport {
     ServiceComponentHostResponse shr3 = new ServiceComponentHostResponse("Cluster100", "Service100", "Component103", "Component 103",
         "Host100", "Host100", "STARTED", "", null, null, null);
 
-    Set<ServiceComponentHostResponse> responses = new HashSet<ServiceComponentHostResponse>();
+    Set<ServiceComponentHostResponse> responses = new HashSet<>();
     responses.add(shr1);
     responses.add(shr2);
     responses.add(shr3);
@@ -541,7 +541,7 @@ public class HostResourceProviderTest extends EasyMockSupport {
         EasyMock.<Map<Resource.Type, String>>anyObject(),
         eq(managementController))).andReturn(hostResourceProvider).anyTimes();
 
-    Set<String> propertyIds = new HashSet<String>();
+    Set<String> propertyIds = new HashSet<>();
 
     propertyIds.add(HostResourceProvider.HOST_CLUSTER_NAME_PROPERTY_ID);
     propertyIds.add(HostResourceProvider.HOST_NAME_PROPERTY_ID);
@@ -619,7 +619,7 @@ public class HostResourceProviderTest extends EasyMockSupport {
         EasyMock.<Map<Resource.Type, String>>anyObject(),
         eq(managementController))).andReturn(hostResourceProvider).anyTimes();
 
-    Set<String> propertyIds = new HashSet<String>();
+    Set<String> propertyIds = new HashSet<>();
 
     propertyIds.add(HostResourceProvider.HOST_CLUSTER_NAME_PROPERTY_ID);
     propertyIds.add(HostResourceProvider.HOST_NAME_PROPERTY_ID);
@@ -682,7 +682,7 @@ public class HostResourceProviderTest extends EasyMockSupport {
 
     RecoveryReport rr = new RecoveryReport();
     rr.setSummary("RECOVERABLE");
-    List<ComponentRecoveryReport> compRecReports = new ArrayList<ComponentRecoveryReport>();
+    List<ComponentRecoveryReport> compRecReports = new ArrayList<>();
     ComponentRecoveryReport compRecReport = new ComponentRecoveryReport();
     compRecReport.setLimitReached(Boolean.FALSE);
     compRecReport.setName("DATANODE");
@@ -694,13 +694,13 @@ public class HostResourceProviderTest extends EasyMockSupport {
 
     AbstractControllerResourceProvider.init(resourceProviderFactory);
 
-    Set<Cluster> clusterSet = new HashSet<Cluster>();
+    Set<Cluster> clusterSet = new HashSet<>();
     clusterSet.add(cluster);
 
     ServiceComponentHostResponse shr1 = new ServiceComponentHostResponse("Cluster100", "Service100", "Component100", "Component 100",
         "Host100", "Host100", "STARTED", "", null, null, null);
 
-    Set<ServiceComponentHostResponse> responses = new HashSet<ServiceComponentHostResponse>();
+    Set<ServiceComponentHostResponse> responses = new HashSet<>();
     responses.add(shr1);
 
     // set expectations
@@ -724,7 +724,7 @@ public class HostResourceProviderTest extends EasyMockSupport {
         eq(managementController))).andReturn(hostResourceProvider).anyTimes();
 
 
-    Set<String> propertyIds = new HashSet<String>();
+    Set<String> propertyIds = new HashSet<>();
 
     propertyIds.add(HostResourceProvider.HOST_CLUSTER_NAME_PROPERTY_ID);
     propertyIds.add(HostResourceProvider.HOST_NAME_PROPERTY_ID);
@@ -781,7 +781,7 @@ public class HostResourceProviderTest extends EasyMockSupport {
     Host host100 = createMockHost("Host100", "Cluster100", null, "ALERT", "RECOVERABLE", null);
 
     AbstractControllerResourceProvider.init(resourceProviderFactory);
-    Set<Cluster> clusterSet = new HashSet<Cluster>();
+    Set<Cluster> clusterSet = new HashSet<>();
     clusterSet.add(cluster);
 
     ServiceComponentHostResponse shr1 = new ServiceComponentHostResponse("Cluster100", "Service100", "Component100", "Component 100",
@@ -791,7 +791,7 @@ public class HostResourceProviderTest extends EasyMockSupport {
     ServiceComponentHostResponse shr3 = new ServiceComponentHostResponse("Cluster100", "Service100", "Component103", "Component 103",
         "Host100", "Host100", "STARTED", "", null, null, null);
 
-    Set<ServiceComponentHostResponse> responses = new HashSet<ServiceComponentHostResponse>();
+    Set<ServiceComponentHostResponse> responses = new HashSet<>();
     responses.add(shr1);
     responses.add(shr2);
     responses.add(shr3);
@@ -822,7 +822,7 @@ public class HostResourceProviderTest extends EasyMockSupport {
         eq(managementController))).andReturn(hostResourceProvider).anyTimes();
 
 
-    Set<String> propertyIds = new HashSet<String>();
+    Set<String> propertyIds = new HashSet<>();
 
     propertyIds.add(HostResourceProvider.HOST_CLUSTER_NAME_PROPERTY_ID);
     propertyIds.add(HostResourceProvider.HOST_NAME_PROPERTY_ID);
@@ -927,7 +927,7 @@ public class HostResourceProviderTest extends EasyMockSupport {
 
     SecurityContextHolder.getContext().setAuthentication(authentication);
 
-    Map<String, Object> properties = new LinkedHashMap<String, Object>();
+    Map<String, Object> properties = new LinkedHashMap<>();
 
     properties.put(HostResourceProvider.HOST_CLUSTER_NAME_PROPERTY_ID, "Cluster100");
     properties.put(HostResourceProvider.HOST_NAME_PROPERTY_ID, "Host100");
@@ -983,7 +983,7 @@ public class HostResourceProviderTest extends EasyMockSupport {
 
     AbstractControllerResourceProvider.init(resourceProviderFactory);
 
-    Set<Cluster> clusterSet = new HashSet<Cluster>();
+    Set<Cluster> clusterSet = new HashSet<>();
     clusterSet.add(cluster);
 
     Host host100 = createMockHost("Host100", "Cluster100", null, "HEALTHY", "RECOVERABLE", null);
@@ -1027,7 +1027,7 @@ public class HostResourceProviderTest extends EasyMockSupport {
         managementController);
 
     // add the property map to a set for the request.
-    Map<String, Object> properties = new LinkedHashMap<String, Object>();
+    Map<String, Object> properties = new LinkedHashMap<>();
 
     properties.put(HostResourceProvider.HOST_RACK_INFO_PROPERTY_ID, "rack info");
 
@@ -1269,7 +1269,7 @@ public class HostResourceProviderTest extends EasyMockSupport {
     HostRequest request3 = new HostRequest("host3", "cluster1", Collections.<String, String>emptyMap());
     HostRequest request4 = new HostRequest("host4", "cluster1", Collections.<String, String>emptyMap());
 
-    Set<HostRequest> setRequests = new HashSet<HostRequest>();
+    Set<HostRequest> setRequests = new HashSet<>();
     setRequests.add(request1);
     setRequests.add(request2);
     setRequests.add(request3);
@@ -1317,10 +1317,10 @@ public class HostResourceProviderTest extends EasyMockSupport {
 
   public static void createHosts(AmbariManagementController controller, Set<HostRequest> requests) throws AmbariException {
     HostResourceProvider provider = getHostProvider(controller);
-    Set<Map<String, Object>> properties = new HashSet<Map<String, Object>>();
+    Set<Map<String, Object>> properties = new HashSet<>();
 
     for (HostRequest request : requests) {
-      Map<String, Object> requestProperties = new HashMap<String, Object>();
+      Map<String, Object> requestProperties = new HashMap<>();
       requestProperties.put(HostResourceProvider.HOST_NAME_PROPERTY_ID, request.getHostname());
       requestProperties.put(HostResourceProvider.HOST_CLUSTER_NAME_PROPERTY_ID, request.getClusterName());
       properties.add(requestProperties);

http://git-wip-us.apache.org/repos/asf/ambari/blob/e8080350/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/InstanceResourceProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/InstanceResourceProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/InstanceResourceProviderTest.java
index ec7ed89..c43e214 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/InstanceResourceProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/InstanceResourceProviderTest.java
@@ -50,9 +50,9 @@ public class InstanceResourceProviderTest {
   public void testCreateResources() throws Exception {
     IvoryService service = createMock(IvoryService.class);
 
-    Set<Map<String, Object>> propertySet = new HashSet<Map<String, Object>>();
+    Set<Map<String, Object>> propertySet = new HashSet<>();
 
-    Map<String, Object> properties = new HashMap<String, Object>();
+    Map<String, Object> properties = new HashMap<>();
 
     // replay
     replay(service);
@@ -81,11 +81,11 @@ public class InstanceResourceProviderTest {
   public void testGetResources() throws Exception {
     IvoryService service = createMock(IvoryService.class);
 
-    Set<Map<String, Object>> propertySet = new HashSet<Map<String, Object>>();
+    Set<Map<String, Object>> propertySet = new HashSet<>();
 
-    Map<String, Object> properties = new HashMap<String, Object>();
+    Map<String, Object> properties = new HashMap<>();
 
-    List<Instance> instances = new LinkedList<Instance>();
+    List<Instance> instances = new LinkedList<>();
 
     Instance instance1 = new Instance("Feed1", "Instance1", "s", "st", "et", "d", "l");
     Instance instance2 = new Instance("Feed1", "Instance2", "s", "st", "et", "d", "l");
@@ -122,9 +122,9 @@ public class InstanceResourceProviderTest {
   public void testUpdateResources() throws Exception {
     IvoryService service = createMock(IvoryService.class);
 
-    Set<Map<String, Object>> propertySet = new HashSet<Map<String, Object>>();
+    Set<Map<String, Object>> propertySet = new HashSet<>();
 
-    Map<String, Object> properties = new HashMap<String, Object>();
+    Map<String, Object> properties = new HashMap<>();
 
     properties.put(InstanceResourceProvider.INSTANCE_FEED_NAME_PROPERTY_ID, "Feed1");
     properties.put(InstanceResourceProvider.INSTANCE_ID_PROPERTY_ID, "Instance1");
@@ -134,7 +134,7 @@ public class InstanceResourceProviderTest {
     properties.put(InstanceResourceProvider.INSTANCE_DETAILS_PROPERTY_ID, "DETAILS");
     properties.put(InstanceResourceProvider.INSTANCE_LOG_PROPERTY_ID, "log");
 
-    List<Instance> instances = new LinkedList<Instance>();
+    List<Instance> instances = new LinkedList<>();
 
     // set expectations
     expect(service.getFeedNames()).andReturn(Collections.singletonList("Feed1"));

http://git-wip-us.apache.org/repos/asf/ambari/blob/e8080350/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/JMXHostProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/JMXHostProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/JMXHostProviderTest.java
index 4a57092..3cc6416 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/JMXHostProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/JMXHostProviderTest.java
@@ -112,7 +112,7 @@ public class JMXHostProviderTest {
       dStateStr = desiredState.toString();
     }
     ServiceRequest r1 = new ServiceRequest(clusterName, serviceName, dStateStr);
-    Set<ServiceRequest> requests = new HashSet<ServiceRequest>();
+    Set<ServiceRequest> requests = new HashSet<>();
     requests.add(r1);
     ServiceResourceProviderTest.createServices(controller, requests);
   }
@@ -127,7 +127,7 @@ public class JMXHostProviderTest {
     ServiceComponentRequest r = new ServiceComponentRequest(clusterName,
       serviceName, componentName, dStateStr);
     Set<ServiceComponentRequest> requests =
-      new HashSet<ServiceComponentRequest>();
+      new HashSet<>();
     requests.add(r);
     ComponentResourceProviderTest.createComponents(controller, requests);
   }
@@ -142,7 +142,7 @@ public class JMXHostProviderTest {
     ServiceComponentHostRequest r = new ServiceComponentHostRequest(clusterName,
       serviceName, componentName, hostname, dStateStr);
     Set<ServiceComponentHostRequest> requests =
-      new HashSet<ServiceComponentHostRequest>();
+      new HashSet<>();
     requests.add(r);
     controller.createHostComponents(requests);
   }
@@ -168,13 +168,13 @@ public class JMXHostProviderTest {
 
     String host1 = "h1";
     clusters.addHost(host1);
-    Map<String, String> hostAttributes = new HashMap<String, String>();
+    Map<String, String> hostAttributes = new HashMap<>();
     hostAttributes.put("os_family", "redhat");
     hostAttributes.put("os_release_version", "5.9");
     clusters.getHost("h1").setHostAttributes(hostAttributes);
     String host2 = "h2";
     clusters.addHost(host2);
-    hostAttributes = new HashMap<String, String>();
+    hostAttributes = new HashMap<>();
     hostAttributes.put("os_family", "redhat");
     hostAttributes.put("os_release_version", "6.3");
     clusters.getHost("h2").setHostAttributes(hostAttributes);
@@ -194,7 +194,7 @@ public class JMXHostProviderTest {
 
     // Create configs
     if (version1) {
-      Map<String, String> configs = new HashMap<String, String>();
+      Map<String, String> configs = new HashMap<>();
       configs.put(NAMENODE_PORT_V1, "localhost:${ambari.dfs.datanode.http.port}");
       configs.put(DATANODE_PORT, "localhost:70075");
       configs.put("ambari.dfs.datanode.http.port", "70070");
@@ -206,7 +206,7 @@ public class JMXHostProviderTest {
       controller.updateClusters(Collections.singleton(crequest), new HashMap<String,String>());
 
     } else {
-      Map<String, String> configs = new HashMap<String, String>();
+      Map<String, String> configs = new HashMap<>();
       configs.put(NAMENODE_PORT_V2, "localhost:70071");
       configs.put(DATANODE_PORT, "localhost:70075");
 
@@ -266,13 +266,13 @@ public class JMXHostProviderTest {
 
     String host1 = "h1";
     clusters.addHost(host1);
-    Map<String, String> hostAttributes = new HashMap<String, String>();
+    Map<String, String> hostAttributes = new HashMap<>();
     hostAttributes.put("os_family", "redhat");
     hostAttributes.put("os_release_version", "5.9");
     clusters.getHost("h1").setHostAttributes(hostAttributes);
     String host2 = "h2";
     clusters.addHost(host2);
-    hostAttributes = new HashMap<String, String>();
+    hostAttributes = new HashMap<>();
     hostAttributes.put("os_family", "redhat");
     hostAttributes.put("os_release_version", "6.3");
     clusters.getHost("h2").setHostAttributes(hostAttributes);
@@ -305,7 +305,7 @@ public class JMXHostProviderTest {
       host2, null);
 
     // Create configs
-    Map<String, String> configs = new HashMap<String, String>();
+    Map<String, String> configs = new HashMap<>();
     configs.put(NAMENODE_PORT_V1, "localhost:${ambari.dfs.datanode.http.port}");
     configs.put(DATANODE_PORT, "localhost:70075");
     configs.put("ambari.dfs.datanode.http.port", "70070");
@@ -313,18 +313,18 @@ public class JMXHostProviderTest {
     configs.put(DATANODE_HTTPS_PORT, "50475");
     configs.put(HDFS_HTTPS_POLICY, "HTTPS_ONLY");
 
-    Map<String, String> yarnConfigs = new HashMap<String, String>();
+    Map<String, String> yarnConfigs = new HashMap<>();
     yarnConfigs.put(RESOURCEMANAGER_PORT, "8088");
     yarnConfigs.put(NODEMANAGER_PORT, "8042");
     yarnConfigs.put(RESOURCEMANAGER_HTTPS_PORT, "8090");
     yarnConfigs.put(NODEMANAGER_HTTPS_PORT, "8044");
     yarnConfigs.put(YARN_HTTPS_POLICY, "HTTPS_ONLY");
 
-    Map<String, String> mapreduceConfigs = new HashMap<String, String>();
+    Map<String, String> mapreduceConfigs = new HashMap<>();
     mapreduceConfigs.put(MAPREDUCE_HTTPS_PORT, "19889");
     mapreduceConfigs.put(MAPREDUCE_HTTPS_POLICY, "HTTPS_ONLY");
 
-    Map<String, String> hbaseConfigs = new HashMap<String, String>();
+    Map<String, String> hbaseConfigs = new HashMap<>();
     hbaseConfigs.put("hbase.ssl.enabled", "true");
 
     ConfigurationRequest cr1 = new ConfigurationRequest(clusterName,
@@ -379,13 +379,13 @@ public class JMXHostProviderTest {
 
     String host1 = "h1";
     clusters.addHost(host1);
-    Map<String, String> hostAttributes = new HashMap<String, String>();
+    Map<String, String> hostAttributes = new HashMap<>();
     hostAttributes.put("os_family", "redhat");
     hostAttributes.put("os_release_version", "5.9");
     clusters.getHost("h1").setHostAttributes(hostAttributes);
     String host2 = "h2";
     clusters.addHost(host2);
-    hostAttributes = new HashMap<String, String>();
+    hostAttributes = new HashMap<>();
     hostAttributes.put("os_family", "redhat");
     hostAttributes.put("os_release_version", "6.3");
     clusters.getHost("h2").setHostAttributes(hostAttributes);
@@ -406,7 +406,7 @@ public class JMXHostProviderTest {
         host2, null);
 
     // Create configs
-    Map<String, String> configs = new HashMap<String, String>();
+    Map<String, String> configs = new HashMap<>();
     configs.put("dfs.internal.nameservices", "ns");
     configs.put("dfs.namenode.http-address", "h1:50070");
     configs.put("dfs.namenode.http-address.ns.nn1", "h1:50071");
@@ -513,7 +513,7 @@ public class JMXHostProviderTest {
     Service serviceMock = createNiceMock(Service.class);
     ServiceComponent serviceComponentMock = createNiceMock(ServiceComponent.class);
 
-    Map<String, ServiceComponentHost> hostComponents = new HashMap<String, ServiceComponentHost>();
+    Map<String, ServiceComponentHost> hostComponents = new HashMap<>();
     hostComponents.put("host1", null);
 
     expect(managementControllerMock.getClusters()).andReturn(clustersMock).anyTimes();
@@ -612,7 +612,7 @@ public class JMXHostProviderTest {
     // Non default port addresses
     Assert.assertEquals("8088", providerModule.getPort("c1", "RESOURCEMANAGER", "localhost"));
 
-    Map<String, String> yarnConfigs = new HashMap<String, String>();
+    Map<String, String> yarnConfigs = new HashMap<>();
     yarnConfigs.put(RESOURCEMANAGER_PORT, "localhost:50030");
     yarnConfigs.put(NODEMANAGER_PORT, "localhost:11111");
     ConfigurationRequest cr2 = new ConfigurationRequest("c1",


Mime
View raw message