ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adorosz...@apache.org
Subject [12/13] ambari git commit: AMBARI-21723. Redundant type arguments (Java 8)
Date Wed, 16 Aug 2017 08:45:45 GMT
http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractProviderModule.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractProviderModule.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractProviderModule.java
index 0242d7c..77549f5 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractProviderModule.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractProviderModule.java
@@ -204,10 +204,10 @@ public abstract class AbstractProviderModule implements ProviderModule,
     jmxDesiredRpcSuffixProperties.put("NAMENODE-HA", initPropMap);
 
     HTTP_PROPERTY_REQUESTS.put("RESOURCEMANAGER",
-        Collections.<HttpPropertyProvider.HttpPropertyRequest>singletonList(new ResourceManagerHttpPropertyRequest()));
+        Collections.singletonList(new ResourceManagerHttpPropertyRequest()));
 
     HTTP_PROPERTY_REQUESTS.put("ATLAS_SERVER",
-        Collections.<HttpPropertyProvider.HttpPropertyRequest>singletonList(new AtlasServerHttpPropertyRequest()));
+        Collections.singletonList(new AtlasServerHttpPropertyRequest()));
   }
 
   /**
@@ -572,7 +572,7 @@ public abstract class AbstractProviderModule implements ProviderModule,
             // this will trigger using the default port for the component
             String portString = getPortString(entry.getValue());
             if (null != portString) {
-              clusterJmxPorts.putIfAbsent(hostName, new ConcurrentHashMap<String, String>());
+              clusterJmxPorts.putIfAbsent(hostName, new ConcurrentHashMap<>());
               clusterJmxPorts.get(hostName).put(entry.getKey(), portString);
             }
           }
@@ -1219,7 +1219,7 @@ public abstract class AbstractProviderModule implements ProviderModule,
         componentToPortsMap = jmxDesiredRpcSuffixes.get(clusterName);
       } else {
         componentToPortsMap = new HashMap<>();
-        componentToPortsMap.put(componentName, new HashMap<String, String>());
+        componentToPortsMap.put(componentName, new HashMap<>());
         jmxDesiredRpcSuffixes.put(clusterName, componentToPortsMap);
       }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintResourceProvider.java
index 45c048a..73d2490 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/BlueprintResourceProvider.java
@@ -213,7 +213,7 @@ public class BlueprintResourceProvider extends AbstractControllerResourceProvide
 
         if (name != null) {
           BlueprintEntity entity = blueprintDAO.findByName(name);
-          results = entity == null ? Collections.<BlueprintEntity>emptyList() :
+          results = entity == null ? Collections.emptyList() :
               Collections.singletonList(entity);
         }
       }
@@ -618,7 +618,7 @@ public class BlueprintResourceProvider extends AbstractControllerResourceProvide
     private void addConfigAttribute(Map<String, Map<String, String>> configDependencyProperties,
                                     String[] propertyNameTokens, String value) {
       if (!configDependencyProperties.containsKey(propertyNameTokens[2])) {
-        configDependencyProperties.put(propertyNameTokens[2], new HashMap<String, String>());
+        configDependencyProperties.put(propertyNameTokens[2], new HashMap<>());
       }
       Map<String, String> propertiesGroup = configDependencyProperties.get(propertyNameTokens[2]);
       propertiesGroup.put(propertyNameTokens[3], value);

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterControllerImpl.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterControllerImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterControllerImpl.java
index c5c4ca1..4e1ce6b 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterControllerImpl.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterControllerImpl.java
@@ -138,7 +138,7 @@ public class ClusterControllerImpl implements ClusterController {
       // get the resources
       queryResponse = provider.queryForResources(request, predicate);
     }
-    return queryResponse == null ? new QueryResponseImpl(Collections.<Resource>emptySet()) : queryResponse;
+    return queryResponse == null ? new QueryResponseImpl(Collections.emptySet()) : queryResponse;
   }
 
   @Override
@@ -448,7 +448,7 @@ public class ClusterControllerImpl implements ClusterController {
    */
   private boolean checkProperties(Type type, Request request, Predicate predicate)
       throws UnsupportedPropertyException {
-    Set<String> requestPropertyIds = request == null ? new HashSet<String>() :
+    Set<String> requestPropertyIds = request == null ? new HashSet<>() :
         PropertyHelper.getAssociatedPropertyIds(request);
 
     if (predicate != null) {
@@ -566,7 +566,7 @@ public class ClusterControllerImpl implements ClusterController {
       if (!propertyProviders.containsKey(type)) {
         List<PropertyProvider> providers = providerModule.getPropertyProviders(type);
         propertyProviders.put(type,
-            providers == null ? Collections.<PropertyProvider>emptyList() : providers);
+            providers == null ? Collections.emptyList() : providers);
       }
     }
     return propertyProviders.get(type);

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterResourceProvider.java
index 11d157c..abb017b 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterResourceProvider.java
@@ -251,7 +251,7 @@ public class ClusterResourceProvider extends AbstractControllerResourceProvider
     final Set<ClusterRequest> requests = new HashSet<>();
 
     if (predicate == null) {
-      requests.add(getRequest(Collections.<String, Object>emptyMap()));
+      requests.add(getRequest(Collections.emptyMap()));
     } else {
       for (Map<String, Object> propertyMap : getPropertyMaps(predicate)) {
         requests.add(getRequest(propertyMap));

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java
index 979124e..105519d 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java
@@ -253,7 +253,7 @@ public class ClusterStackVersionResourceProvider extends AbstractControllerResou
       final List<RepositoryVersionState> allStates = new ArrayList<>();
       final Map<RepositoryVersionState, List<String>> hostStates = new HashMap<>();
       for (RepositoryVersionState state: RepositoryVersionState.values()) {
-        hostStates.put(state, new ArrayList<String>());
+        hostStates.put(state, new ArrayList<>());
       }
 
       StackEntity repoVersionStackEntity = repositoryVersion.getStack();
@@ -482,7 +482,7 @@ public class ClusterStackVersionResourceProvider extends AbstractControllerResou
       if (operatingSystem.isAmbariManagedRepos()) {
         perOsRepos.put(operatingSystem.getOsType(), operatingSystem.getRepositories());
       } else {
-        perOsRepos.put(operatingSystem.getOsType(), Collections.<RepositoryEntity> emptyList());
+        perOsRepos.put(operatingSystem.getOsType(), Collections.emptyList());
       }
     }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ComponentResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ComponentResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ComponentResourceProvider.java
index 2df3b00..ebbf169 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ComponentResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ComponentResourceProvider.java
@@ -331,12 +331,12 @@ public class ComponentResourceProvider extends AbstractControllerResourceProvide
       debug("Received a createComponent request: {}", request);
 
       if (!componentNames.containsKey(request.getClusterName())) {
-        componentNames.put(request.getClusterName(), new HashMap<String, Set<String>>());
+        componentNames.put(request.getClusterName(), new HashMap<>());
       }
 
       Map<String, Set<String>> serviceComponents = componentNames.get(request.getClusterName());
       if (!serviceComponents.containsKey(request.getServiceName())) {
-        serviceComponents.put(request.getServiceName(), new HashSet<String>());
+        serviceComponents.put(request.getServiceName(), new HashSet<>());
       }
 
       if (serviceComponents.get(request.getServiceName()).contains(request.getComponentName())) {
@@ -568,10 +568,10 @@ public class ComponentResourceProvider extends AbstractControllerResourceProvide
       Validate.isTrue(clusterNames.size() == 1, "Updates to multiple clusters is not supported");
 
       if (!componentNames.containsKey(clusterName)) {
-        componentNames.put(clusterName, new HashMap<String, Set<String>>());
+        componentNames.put(clusterName, new HashMap<>());
       }
       if (!componentNames.get(clusterName).containsKey(serviceName)) {
-        componentNames.get(clusterName).put(serviceName, new HashSet<String>());
+        componentNames.get(clusterName).put(serviceName, new HashSet<>());
       }
       if (componentNames.get(clusterName).get(serviceName).contains(componentName)){
         // throw error later for dup
@@ -642,7 +642,7 @@ public class ComponentResourceProvider extends AbstractControllerResourceProvide
         }
 
         if (!changedComps.containsKey(newState)) {
-          changedComps.put(newState, new ArrayList<ServiceComponent>());
+          changedComps.put(newState, new ArrayList<>());
         }
         debug("Handling update to ServiceComponent"
               + ", clusterName=" + clusterName
@@ -709,10 +709,10 @@ public class ComponentResourceProvider extends AbstractControllerResourceProvide
               + ", newDesiredState=" + newState);
         }
         if (!changedScHosts.containsKey(sc.getName())) {
-          changedScHosts.put(sc.getName(), new HashMap<State, List<ServiceComponentHost>>());
+          changedScHosts.put(sc.getName(), new HashMap<>());
         }
         if (!changedScHosts.get(sc.getName()).containsKey(newState)) {
-          changedScHosts.get(sc.getName()).put(newState, new ArrayList<ServiceComponentHost>());
+          changedScHosts.get(sc.getName()).put(newState, new ArrayList<>());
         }
 
         debug("Handling update to ServiceComponentHost"

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProvider.java
index 25af9d2..2a45f02 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ConfigGroupResourceProvider.java
@@ -720,9 +720,9 @@ public class ConfigGroupResourceProvider extends
                 request.getServiceConfigVersionNote(), configGroup);
 
         ConfigGroupResponse configGroupResponse = new ConfigGroupResponse(configGroup.getId(), cluster.getClusterName(), configGroup.getName(),
-                request.getTag(), "", new HashSet<Map<String, Object>>(), new HashSet<Map<String, Object>>());
-        Set<Map<String, Object>> versionTags = new HashSet<Map<String, Object>>();
-        Map<String, Object> tagsMap = new HashMap<String, Object>();
+                request.getTag(), "", new HashSet<>(), new HashSet<>());
+        Set<Map<String, Object>> versionTags = new HashSet<>();
+        Map<String, Object> tagsMap = new HashMap<>();
         for (Config config : configGroup.getConfigurations().values()) {
           tagsMap.put(config.getType(), config.getTag());
         }
@@ -808,7 +808,7 @@ public class ConfigGroupResourceProvider extends
               } else if ("properties_attributes".equals(PropertyHelper.getPropertyCategory(propertyCategory))) {
                 String attributeName = PropertyHelper.getPropertyName(propertyCategory);
                 if (!configAttributes.containsKey(attributeName)) {
-                  configAttributes.put(attributeName, new HashMap<String, String>());
+                  configAttributes.put(attributeName, new HashMap<>());
                 }
                 Map<String, String> attributeValues
                     = configAttributes.get(attributeName);

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ConfigurationResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ConfigurationResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ConfigurationResourceProvider.java
index 11e9bac..0f26085 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ConfigurationResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ConfigurationResourceProvider.java
@@ -284,7 +284,7 @@ public class ConfigurationResourceProvider extends
 
     ConfigurationRequest configRequest = new ConfigurationRequest(
         (String) properties.get(CONFIGURATION_CLUSTER_NAME_PROPERTY_ID),
-        type, tag, new HashMap<String, String>(), new HashMap<String, Map<String, String>>());
+        type, tag, new HashMap<>(), new HashMap<>());
 
     Set<String> requestedIds = request.getPropertyIds();
     if (requestedIds.contains("properties") || requestedIds.contains("*")) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ExportBlueprintRequest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ExportBlueprintRequest.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ExportBlueprintRequest.java
index a65bb4f..16d3114 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ExportBlueprintRequest.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ExportBlueprintRequest.java
@@ -186,8 +186,8 @@ public class ExportBlueprintRequest implements TopologyRequest {
     configuration = new Configuration(properties, attributes);
     // empty parent configuration when exporting as all properties are included in this configuration
     configuration.setParentConfiguration(new Configuration(
-        Collections.<String, Map<String, String>>emptyMap(),
-        Collections.<String, Map<String, Map<String, String>>>emptyMap()));
+        Collections.emptyMap(),
+        Collections.emptyMap()));
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/Extension.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/Extension.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/Extension.java
index 25f6643..2182f1a 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/Extension.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/Extension.java
@@ -245,7 +245,7 @@ public class Extension {
   //todo: full dependency graph
   public Collection<DependencyInfo> getDependenciesForComponent(String component) {
     return dependencies.containsKey(component) ? dependencies.get(component) :
-        Collections.<DependencyInfo>emptySet();
+        Collections.emptySet();
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ExtensionLinkResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ExtensionLinkResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ExtensionLinkResourceProvider.java
index 2905a08..9b894ff 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ExtensionLinkResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ExtensionLinkResourceProvider.java
@@ -120,7 +120,7 @@ public class ExtensionLinkResourceProvider extends AbstractControllerResourcePro
 
     final Set<ExtensionLinkRequest> requests = new HashSet<>();
     if (predicate == null) {
-      requests.add(getRequest(Collections.<String, Object>emptyMap()));
+      requests.add(getRequest(Collections.emptyMap()));
     } else {
       for (Map<String, Object> propertyMap : getPropertyMaps(predicate)) {
         requests.add(getRequest(propertyMap));
@@ -159,7 +159,7 @@ public class ExtensionLinkResourceProvider extends AbstractControllerResourcePro
 
     final Set<ExtensionLinkRequest> requests = new HashSet<>();
     if (predicate == null) {
-      requests.add(getRequest(Collections.<String, Object>emptyMap()));
+      requests.add(getRequest(Collections.emptyMap()));
     } else {
       for (Map<String, Object> propertyMap : getPropertyMaps(predicate)) {
         requests.add(getRequest(propertyMap));

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ExtensionResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ExtensionResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ExtensionResourceProvider.java
index 32542a0..53e44e1 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ExtensionResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ExtensionResourceProvider.java
@@ -68,7 +68,7 @@ public class ExtensionResourceProvider extends ReadOnlyResourceProvider {
     final Set<ExtensionRequest> requests = new HashSet<>();
 
     if (predicate == null) {
-      requests.add(getRequest(Collections.<String, Object>emptyMap()));
+      requests.add(getRequest(Collections.emptyMap()));
     } else {
       for (Map<String, Object> propertyMap : getPropertyMaps(predicate)) {
         requests.add(getRequest(propertyMap));

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ExtensionVersionResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ExtensionVersionResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ExtensionVersionResourceProvider.java
index 3d692d2..4aa357c 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ExtensionVersionResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ExtensionVersionResourceProvider.java
@@ -71,7 +71,7 @@ public class ExtensionVersionResourceProvider extends ReadOnlyResourceProvider {
     final Set<ExtensionVersionRequest> requests = new HashSet<>();
 
     if (predicate == null) {
-      requests.add(getRequest(Collections.<String, Object>emptyMap()));
+      requests.add(getRequest(Collections.emptyMap()));
     } else {
       for (Map<String, Object> propertyMap : getPropertyMaps(predicate)) {
         requests.add(getRequest(propertyMap));

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java
index aaf4656..48e15eb 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java
@@ -377,7 +377,7 @@ public class HostComponentResourceProvider extends AbstractControllerResourcePro
   public RequestStatusResponse start(String cluster, String hostName) throws  SystemException,
     UnsupportedPropertyException, NoSuchParentResourceException {
 
-    return this.start(cluster, hostName, Collections.<String>emptySet(), false);
+    return this.start(cluster, hostName, Collections.emptySet(), false);
   }
 
   public RequestStatusResponse start(String cluster, String hostName, Collection<String> installOnlyComponents, boolean skipFailure) throws  SystemException,
@@ -632,12 +632,10 @@ public class HostComponentResourceProvider extends AbstractControllerResourcePro
         directTransitionScHosts.put(sch, newState);
       } else {
         if (!changedScHosts.containsKey(sc.getName())) {
-          changedScHosts.put(sc.getName(),
-              new EnumMap<State, List<ServiceComponentHost>>(State.class));
+          changedScHosts.put(sc.getName(), new EnumMap<>(State.class));
         }
         if (!changedScHosts.get(sc.getName()).containsKey(newState)) {
-          changedScHosts.get(sc.getName()).put(newState,
-              new ArrayList<ServiceComponentHost>());
+          changedScHosts.get(sc.getName()).put(newState, new ArrayList<>());
         }
         LOG.info(getServiceComponentRequestInfoLogMessage("Handling update to host component", request, oldState, newState));
         changedScHosts.get(sc.getName()).get(newState).add(sch);

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostResourceProvider.java
index 01e0aac..5373ffe 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostResourceProvider.java
@@ -955,7 +955,7 @@ public class HostResourceProvider extends AbstractControllerResourceProvider {
         deleteStatusMetaData.addException(hostname, ex);
       }
       removeHostFromClusterTopology(clusters, hostRequest);
-      for (LogicalRequest logicalRequest: topologyManager.getRequests(Collections.<Long>emptyList())) {
+      for (LogicalRequest logicalRequest: topologyManager.getRequests(Collections.emptyList())) {
         logicalRequest.removeHostRequestByHostName(hostname);
       }
     }

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostStackVersionResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostStackVersionResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostStackVersionResourceProvider.java
index fb4831e..bcd4089 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostStackVersionResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostStackVersionResourceProvider.java
@@ -524,7 +524,7 @@ public class HostStackVersionResourceProvider extends AbstractControllerResource
     actionContext = new ActionExecutionContext(
       cluster.getClusterName(), STACK_SELECT_ACTION,
       Collections.singletonList(filter),
-      Collections.<String, String>emptyMap());
+      Collections.emptyMap());
     actionContext.setTimeout(Short.valueOf(configuration.getDefaultAgentTaskTimeout(true)));
 
     try {

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/KerberosDescriptorResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/KerberosDescriptorResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/KerberosDescriptorResourceProvider.java
index 0da51bf..9301341 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/KerberosDescriptorResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/KerberosDescriptorResourceProvider.java
@@ -106,7 +106,7 @@ public class KerberosDescriptorResourceProvider extends AbstractControllerResour
 
         if (name != null) {
           KerberosDescriptorEntity entity = kerberosDescriptorDAO.findByName(name);
-          results = entity == null ? Collections.<KerberosDescriptorEntity>emptyList() :
+          results = entity == null ? Collections.emptyList() :
               Collections.singletonList(entity);
         }
       }

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/OperatingSystemResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/OperatingSystemResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/OperatingSystemResourceProvider.java
index f32f70d..174fdf6 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/OperatingSystemResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/OperatingSystemResourceProvider.java
@@ -85,7 +85,7 @@ public class OperatingSystemResourceProvider extends ReadOnlyResourceProvider {
     final Set<OperatingSystemRequest> requests = new HashSet<>();
 
     if (predicate == null) {
-      requests.add(getRequest(Collections.<String, Object>emptyMap()));
+      requests.add(getRequest(Collections.emptyMap()));
     } else {
       for (Map<String, Object> propertyMap : getPropertyMaps(predicate)) {
         requests.add(getRequest(propertyMap));

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/PrivilegeResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/PrivilegeResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/PrivilegeResourceProvider.java
index e8bef9e..fabce6b 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/PrivilegeResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/PrivilegeResourceProvider.java
@@ -182,7 +182,7 @@ public abstract class PrivilegeResourceProvider<T> extends AbstractAuthorizedRes
     Set<Map<String, Object>> propertyMaps = getPropertyMaps(predicate);
 
     if (propertyMaps.isEmpty()) {
-      propertyMaps.add(Collections.<String, Object>emptyMap());
+      propertyMaps.add(Collections.emptyMap());
     }
 
     for (Map<String, Object> properties : propertyMaps) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RemoteClusterResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RemoteClusterResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RemoteClusterResourceProvider.java
index 3c704b8..0b2d2b3 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RemoteClusterResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RemoteClusterResourceProvider.java
@@ -144,7 +144,7 @@ public class RemoteClusterResourceProvider extends AbstractAuthorizedResourcePro
 
     Set<Map<String, Object>> propertyMaps = getPropertyMaps(predicate);
     if (propertyMaps.isEmpty()) {
-      propertyMaps.add(Collections.<String, Object>emptyMap());
+      propertyMaps.add(Collections.emptyMap());
     }
 
     for (Map<String, Object> propertyMap : propertyMaps) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RepositoryResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RepositoryResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RepositoryResourceProvider.java
index 96b498e..1d3e922 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RepositoryResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RepositoryResourceProvider.java
@@ -131,7 +131,7 @@ public class RepositoryResourceProvider extends AbstractControllerResourceProvid
     final Set<RepositoryRequest> requests = new HashSet<>();
 
     if (predicate == null) {
-      requests.add(getRequest(Collections.<String, Object>emptyMap()));
+      requests.add(getRequest(Collections.emptyMap()));
     } else {
       for (Map<String, Object> propertyMap : getPropertyMaps(predicate)) {
         requests.add(getRequest(propertyMap));

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProvider.java
index ec246c9..60ec014 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RepositoryVersionResourceProvider.java
@@ -388,7 +388,7 @@ public class RepositoryVersionResourceProvider extends AbstractAuthorizedResourc
 
         for (HostVersionEntity hostVersion : hostVersions) {
           if (!hostsInUse.containsKey(hostVersion.getState())) {
-            hostsInUse.put(hostVersion.getState(), new HashSet<String>());
+            hostsInUse.put(hostVersion.getState(), new HashSet<>());
           }
 
           hostsInUse.get(hostVersion.getState()).add(hostVersion.getHostName());

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestImpl.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestImpl.java
index 98eef5e..6467438 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestImpl.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestImpl.java
@@ -106,13 +106,13 @@ public class RequestImpl implements Request {
                      SortRequest sortRequest, PageRequest pageRequest) {
 
     this.propertyIds = propertyIds == null ?
-        ImmutableSet.<String>of() : ImmutableSet.copyOf(propertyIds);
+        ImmutableSet.of() : ImmutableSet.copyOf(propertyIds);
 
     this.properties = properties == null ?
-        ImmutableSet.<Map<String,Object>>of() : ImmutableSet.copyOf(properties);
+        ImmutableSet.of() : ImmutableSet.copyOf(properties);
 
     this.requestInfoProperties = requestInfoProperties == null ?
-        ImmutableMap.<String, String>of() : ImmutableMap.copyOf(requestInfoProperties);
+        ImmutableMap.of() : ImmutableMap.copyOf(requestInfoProperties);
 
 
     m_mapTemporalInfo = mapTemporalInfo;

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java
index 3e8ea01..355e572 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java
@@ -445,7 +445,7 @@ public class RequestResourceProvider extends AbstractControllerResourceProvider
     List<RequestResourceFilter> resourceFilterList = null;
     Set<Map<String, Object>> resourceFilters;
 
-    Map<String, String> params = new HashMap<String, String>();
+    Map<String, String> params = new HashMap<>();
     Object resourceFilterObj = propertyMap.get(REQUEST_RESOURCE_FILTER_ID);
     if (resourceFilterObj != null && resourceFilterObj instanceof HashSet) {
       resourceFilters = (HashSet<Map<String, Object>>) resourceFilterObj;

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestStageContainer.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestStageContainer.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestStageContainer.java
index 1452c3c..3f63895 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestStageContainer.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestStageContainer.java
@@ -97,7 +97,7 @@ public class RequestStageContainer {
   public RequestStageContainer(Long id, List<Stage> stages, RequestFactory factory, ActionManager manager,
                                ExecuteActionRequest actionRequest) {
     this.id = id;
-    this.stages = stages == null ? new ArrayList<Stage>() : stages;
+    this.stages = stages == null ? new ArrayList<>() : stages;
     this.requestFactory = factory;
     this.actionManager = manager;
     this.actionRequest = actionRequest;

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestStatusImpl.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestStatusImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestStatusImpl.java
index 6ed355e..84917cd 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestStatusImpl.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestStatusImpl.java
@@ -44,7 +44,7 @@ public class RequestStatusImpl implements RequestStatus{
   public RequestStatusImpl(Resource requestResource, Set<Resource> associatedResources, RequestStatusMetaData requestStatusMetaData) {
     this.requestResource     = requestResource;
     this.associatedResources = associatedResources == null ?
-        Collections.<Resource>emptySet() : associatedResources;
+        Collections.emptySet() : associatedResources;
     this.requestStatusMetaData = requestStatusMetaData;
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ResourceImpl.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ResourceImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ResourceImpl.java
index 85c4f51..1a04e0a 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ResourceImpl.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ResourceImpl.java
@@ -119,7 +119,7 @@ public class ResourceImpl implements Resource {
     String categoryKey = getCategoryKey(id);
 
     if (!propertiesMap.containsKey(categoryKey)) {
-      propertiesMap.put(categoryKey, new HashMap<String, Object>());
+      propertiesMap.put(categoryKey, new HashMap<>());
     }
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RootServiceComponentResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RootServiceComponentResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RootServiceComponentResourceProvider.java
index f91496e..3925aeb 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RootServiceComponentResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RootServiceComponentResourceProvider.java
@@ -73,7 +73,7 @@ public class RootServiceComponentResourceProvider extends ReadOnlyResourceProvid
     final Set<RootServiceComponentRequest> requests = new HashSet<>();
 
     if (predicate == null) {
-      requests.add(getRequest(Collections.<String, Object>emptyMap()));
+      requests.add(getRequest(Collections.emptyMap()));
     } else {
       for (Map<String, Object> propertyMap : getPropertyMaps(predicate)) {
         requests.add(getRequest(propertyMap));

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RootServiceHostComponentResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RootServiceHostComponentResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RootServiceHostComponentResourceProvider.java
index ddb04d6..c37bb2e 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RootServiceHostComponentResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RootServiceHostComponentResourceProvider.java
@@ -76,7 +76,7 @@ public class RootServiceHostComponentResourceProvider extends ReadOnlyResourcePr
     final Set<RootServiceHostComponentRequest> requests = new HashSet<>();
 
     if (predicate == null) {
-      requests.add(getRequest(Collections.<String, Object>emptyMap()));
+      requests.add(getRequest(Collections.emptyMap()));
     } else {
       for (Map<String, Object> propertyMap : getPropertyMaps(predicate)) {
         requests.add(getRequest(propertyMap));

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RootServiceResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RootServiceResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RootServiceResourceProvider.java
index 12f6472..b24a94a 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RootServiceResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RootServiceResourceProvider.java
@@ -61,7 +61,7 @@ public class RootServiceResourceProvider extends ReadOnlyResourceProvider {
     final Set<RootServiceRequest> requests = new HashSet<>();
 
     if (predicate == null) {
-      requests.add(getRequest(Collections.<String, Object>emptyMap()));
+      requests.add(getRequest(Collections.emptyMap()));
     } else {
       for (Map<String, Object> propertyMap : getPropertyMaps(predicate)) {
         requests.add(getRequest(propertyMap));

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ScaleClusterRequest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ScaleClusterRequest.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ScaleClusterRequest.java
index 3fe61dc..fe33f93 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ScaleClusterRequest.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ScaleClusterRequest.java
@@ -58,8 +58,8 @@ public class ScaleClusterRequest extends BaseClusterRequest {
         setClusterName(String.valueOf(properties.get(HostResourceProvider.HOST_CLUSTER_NAME_PROPERTY_ID)));
       }
       // currently don't allow cluster scoped configuration in scaling operation
-      setConfiguration(new Configuration(Collections.<String, Map<String, String>>emptyMap(),
-          Collections.<String, Map<String, Map<String, String>>>emptyMap()));
+      setConfiguration(new Configuration(Collections.emptyMap(),
+          Collections.emptyMap()));
 
       parseHostGroups(properties);
     }
@@ -143,8 +143,8 @@ public class ScaleClusterRequest extends BaseClusterRequest {
     }
 
     // specifying configuration is scaling request isn't permitted
-    hostGroupInfo.setConfiguration(new Configuration(Collections.<String, Map<String, String>>emptyMap(),
-        Collections.<String, Map<String, Map<String, String>>>emptyMap()));
+    hostGroupInfo.setConfiguration(new Configuration(Collections.emptyMap(),
+        Collections.emptyMap()));
 
     // process host_name and host_count
     if (containsHostCount) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceResourceProvider.java
index 89f75f3..818017e 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ServiceResourceProvider.java
@@ -604,7 +604,7 @@ public class ServiceResourceProvider extends AbstractControllerResourceProvider
       }
 
       if (!serviceNames.containsKey(request.getClusterName())) {
-        serviceNames.put(request.getClusterName(), new HashSet<String>());
+        serviceNames.put(request.getClusterName(), new HashSet<>());
       }
 
       if (serviceNames.get(request.getClusterName())
@@ -707,7 +707,7 @@ public class ServiceResourceProvider extends AbstractControllerResourceProvider
 
         }
         if (!changedServices.containsKey(newState)) {
-          changedServices.put(newState, new ArrayList<Service>());
+          changedServices.put(newState, new ArrayList<>());
         }
         changedServices.get(newState).add(s);
       }
@@ -790,7 +790,7 @@ public class ServiceResourceProvider extends AbstractControllerResourceProvider
               + ", newDesiredState=" + newState);
         }
         if (!changedComps.containsKey(newState)) {
-          changedComps.put(newState, new ArrayList<ServiceComponent>());
+          changedComps.put(newState, new ArrayList<>());
         }
         changedComps.get(newState).add(sc);
       }
@@ -858,12 +858,10 @@ public class ServiceResourceProvider extends AbstractControllerResourceProvider
           }
         }
         if (!changedScHosts.containsKey(sc.getName())) {
-          changedScHosts.put(sc.getName(),
-              new EnumMap<State, List<ServiceComponentHost>>(State.class));
+          changedScHosts.put(sc.getName(), new EnumMap<>(State.class));
         }
         if (!changedScHosts.get(sc.getName()).containsKey(newState)) {
-          changedScHosts.get(sc.getName()).put(newState,
-              new ArrayList<ServiceComponentHost>());
+          changedScHosts.get(sc.getName()).put(newState, new ArrayList<>());
         }
         if (LOG.isDebugEnabled()) {
           LOG.debug("Handling update to ServiceComponentHost, clusterName={}, serviceName={}, componentName={}, hostname={}, currentState={}, newDesiredState={}",
@@ -1030,7 +1028,7 @@ public class ServiceResourceProvider extends AbstractControllerResourceProvider
       }
 
       if (!serviceNames.containsKey(clusterName)) {
-        serviceNames.put(clusterName, new HashSet<String>());
+        serviceNames.put(clusterName, new HashSet<>());
       }
 
       if (serviceNames.get(clusterName).contains(serviceName)) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/Stack.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/Stack.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/Stack.java
index a28a3b5..f8feef2 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/Stack.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/Stack.java
@@ -293,7 +293,7 @@ public class Stack {
   public Set<String> getExcludedConfigurationTypes(String service) {
     return excludedConfigurationTypes.containsKey(service) ?
         excludedConfigurationTypes.get(service) :
-        Collections.<String>emptySet();
+        Collections.emptySet();
   }
 
   /**
@@ -504,7 +504,7 @@ public class Stack {
   //todo: full dependency graph
   public Collection<DependencyInfo> getDependenciesForComponent(String component) {
     return dependencies.containsKey(component) ? dependencies.get(component) :
-        Collections.<DependencyInfo>emptySet();
+        Collections.emptySet();
   }
 
   /**
@@ -558,7 +558,7 @@ public class Stack {
         Map<String, Map<String, String>> stackTypeAttributes = getConfigurationAttributes(service, type);
         if (!stackTypeAttributes.isEmpty()) {
           if (! attributes.containsKey(type)) {
-            attributes.put(type, new HashMap<String, Map<String, String>>());
+            attributes.put(type, new HashMap<>());
           }
           Map<String, Map<String, String>> typeAttributes = attributes.get(type);
           for (Map.Entry<String, Map<String, String>> attribute : stackTypeAttributes.entrySet()) {
@@ -592,7 +592,7 @@ public class Stack {
         Map<String, Map<String, String>> stackTypeAttributes = getConfigurationAttributes(service, type);
         if (!stackTypeAttributes.isEmpty()) {
           if (! stackAttributes.containsKey(type)) {
-            stackAttributes.put(type, new HashMap<String, Map<String, String>>());
+            stackAttributes.put(type, new HashMap<>());
           }
           Map<String, Map<String, String>> typeAttrs = stackAttributes.get(type);
           for (Map.Entry<String, Map<String, String>> attribute : stackTypeAttributes.entrySet()) {
@@ -702,7 +702,7 @@ public class Stack {
     Set<String> configTypes = stackService.getConfigTypes().keySet();
     for (String configType: configTypes) {
       if (!mapServiceConfig.containsKey(configType)) {
-        mapServiceConfig.put(configType, Collections.<String, ConfigProperty>emptyMap());
+        mapServiceConfig.put(configType, Collections.emptyMap());
       }
     }
   }

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackAdvisorResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackAdvisorResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackAdvisorResourceProvider.java
index a162097..7035f0a 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackAdvisorResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackAdvisorResourceProvider.java
@@ -132,7 +132,7 @@ public abstract class StackAdvisorResourceProvider extends ReadOnlyResourceProvi
 
       List<ChangedConfigInfo> changedConfigurations =
         requestType == StackAdvisorRequestType.CONFIGURATION_DEPENDENCIES ?
-          calculateChangedConfigurations(request) : Collections.<ChangedConfigInfo>emptyList();
+          calculateChangedConfigurations(request) : Collections.emptyList();
 
       Set<RecommendationResponse.ConfigGroup> configGroups = calculateConfigGroups(request);
       return StackAdvisorRequestBuilder.
@@ -248,7 +248,7 @@ public abstract class StackAdvisorResourceProvider extends ReadOnlyResourceProvi
               RecommendationResponse.BlueprintConfigurations configurations =
                 new RecommendationResponse.BlueprintConfigurations();
               configGroup.getConfigurations().put(siteName, configurations);
-              configGroup.getConfigurations().get(siteName).setProperties(new HashMap<String, String>());
+              configGroup.getConfigurations().get(siteName).setProperties(new HashMap<>());
             }
             configGroup.getConfigurations().get(siteName).getProperties().put(propertyName, entry.getValue());
           }

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackConfigurationDependencyResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackConfigurationDependencyResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackConfigurationDependencyResourceProvider.java
index 9df7c14..366b3ef 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackConfigurationDependencyResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackConfigurationDependencyResourceProvider.java
@@ -80,7 +80,7 @@ public class StackConfigurationDependencyResourceProvider extends
       new HashSet<>();
 
     if (predicate == null) {
-      requests.add(getRequest(Collections.<String, Object>emptyMap()));
+      requests.add(getRequest(Collections.emptyMap()));
     } else {
       for (Map<String, Object> propertyMap : getPropertyMaps(predicate)) {
         requests.add(getRequest(propertyMap));

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackConfigurationResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackConfigurationResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackConfigurationResourceProvider.java
index 60d5966..6f5b0f8 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackConfigurationResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackConfigurationResourceProvider.java
@@ -99,7 +99,7 @@ public class StackConfigurationResourceProvider extends
     final Set<StackConfigurationRequest> requests = new HashSet<>();
 
     if (predicate == null) {
-      requests.add(getRequest(Collections.<String, Object>emptyMap()));
+      requests.add(getRequest(Collections.emptyMap()));
     } else {
       for (Map<String, Object> propertyMap : getPropertyMaps(predicate)) {
         requests.add(getRequest(propertyMap));

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackLevelConfigurationResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackLevelConfigurationResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackLevelConfigurationResourceProvider.java
index f0c8f08..819507b 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackLevelConfigurationResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackLevelConfigurationResourceProvider.java
@@ -96,7 +96,7 @@ public class StackLevelConfigurationResourceProvider extends
     final Set<StackLevelConfigurationRequest> requests = new HashSet<>();
 
     if (predicate == null) {
-      requests.add(getRequest(Collections.<String, Object>emptyMap()));
+      requests.add(getRequest(Collections.emptyMap()));
     } else {
       for (Map<String, Object> propertyMap : getPropertyMaps(predicate)) {
         requests.add(getRequest(propertyMap));

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackResourceProvider.java
index e4acb35..ead4f6d 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackResourceProvider.java
@@ -63,7 +63,7 @@ public class StackResourceProvider extends ReadOnlyResourceProvider {
     final Set<StackRequest> requests = new HashSet<>();
 
     if (predicate == null) {
-      requests.add(getRequest(Collections.<String, Object>emptyMap()));
+      requests.add(getRequest(Collections.emptyMap()));
     } else {
       for (Map<String, Object> propertyMap : getPropertyMaps(predicate)) {
         requests.add(getRequest(propertyMap));

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackServiceComponentResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackServiceComponentResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackServiceComponentResourceProvider.java
index 764e394..96993da 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackServiceComponentResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackServiceComponentResourceProvider.java
@@ -118,7 +118,7 @@ public class StackServiceComponentResourceProvider extends
     final Set<StackServiceComponentRequest> requests = new HashSet<>();
 
     if (predicate == null) {
-      requests.add(getRequest(Collections.<String, Object>emptyMap()));
+      requests.add(getRequest(Collections.emptyMap()));
     } else {
       for (Map<String, Object> propertyMap : getPropertyMaps(predicate)) {
         requests.add(getRequest(propertyMap));

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackServiceResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackServiceResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackServiceResourceProvider.java
index f62c124..8727741 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackServiceResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackServiceResourceProvider.java
@@ -125,7 +125,7 @@ public class StackServiceResourceProvider extends ReadOnlyResourceProvider {
     final Set<StackServiceRequest> requests = new HashSet<>();
 
     if (predicate == null) {
-      requests.add(getRequest(Collections.<String, Object>emptyMap()));
+      requests.add(getRequest(Collections.emptyMap()));
     } else {
       for (Map<String, Object> propertyMap : getPropertyMaps(predicate)) {
         requests.add(getRequest(propertyMap));

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackVersionResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackVersionResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackVersionResourceProvider.java
index e993dca..64ead40 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackVersionResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackVersionResourceProvider.java
@@ -93,7 +93,7 @@ public class StackVersionResourceProvider extends ReadOnlyResourceProvider {
     final Set<StackVersionRequest> requests = new HashSet<>();
 
     if (predicate == null) {
-      requests.add(getRequest(Collections.<String, Object>emptyMap()));
+      requests.add(getRequest(Collections.emptyMap()));
     } else {
       for (Map<String, Object> propertyMap : getPropertyMaps(predicate)) {
         requests.add(getRequest(propertyMap));

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
index ea3cf65..a35f380 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java
@@ -1112,7 +1112,7 @@ public class UpgradeResourceProvider extends AbstractControllerResourceProvider
     List<RequestResourceFilter> filters = new ArrayList<>();
 
     for (TaskWrapper tw : wrapper.getTasks()) {
-      filters.add(new RequestResourceFilter(tw.getService(), "", Collections.<String> emptyList()));
+      filters.add(new RequestResourceFilter(tw.getService(), "", Collections.emptyList()));
     }
 
     Cluster cluster = context.getCluster();
@@ -1255,7 +1255,7 @@ public class UpgradeResourceProvider extends AbstractControllerResourceProvider
     }
 
     ActionExecutionContext actionContext = new ActionExecutionContext(cluster.getClusterName(),
-        Role.AMBARI_SERVER_ACTION.toString(), Collections.<RequestResourceFilter> emptyList(),
+        Role.AMBARI_SERVER_ACTION.toString(), Collections.emptyList(),
         commandParams);
 
     actionContext.setTimeout(Short.valueOf((short) -1));

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/VersionDefinitionResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/VersionDefinitionResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/VersionDefinitionResourceProvider.java
index 4696c70..c789096 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/VersionDefinitionResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/VersionDefinitionResourceProvider.java
@@ -338,7 +338,7 @@ public class VersionDefinitionResourceProvider extends AbstractAuthorizedResourc
 
       s_repoVersionDAO.create(xmlHolder.entity);
 
-      res = toResource(xmlHolder.entity, Collections.<String>emptySet());
+      res = toResource(xmlHolder.entity, Collections.emptySet());
       notifyCreate(Resource.Type.VersionDefinition, request);
     }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProvider.java
index 9f0f900..88c2a68 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewInstanceResourceProvider.java
@@ -161,7 +161,7 @@ public class ViewInstanceResourceProvider extends AbstractAuthorizedResourceProv
 
     Set<Map<String, Object>> propertyMaps = getPropertyMaps(predicate);
     if (propertyMaps.isEmpty()) {
-      propertyMaps.add(Collections.<String, Object>emptyMap());
+      propertyMaps.add(Collections.emptyMap());
     }
 
     for (Map<String, Object> propertyMap : propertyMaps) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewPrivilegeResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewPrivilegeResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewPrivilegeResourceProvider.java
index 542965d..eb57759 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewPrivilegeResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewPrivilegeResourceProvider.java
@@ -129,7 +129,7 @@ public class ViewPrivilegeResourceProvider extends PrivilegeResourceProvider<Vie
 
       return view.isDeployed() ?
           Collections.singletonMap(viewInstanceEntity.getResource().getId(), viewInstanceEntity) :
-          Collections.<Long, ViewInstanceEntity>emptyMap();
+          Collections.emptyMap();
     }
 
     Set<ViewEntity> viewEntities = new HashSet<>();

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewResourceProvider.java
index 519a0d7..7179b33 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewResourceProvider.java
@@ -100,7 +100,7 @@ public class ViewResourceProvider extends AbstractAuthorizedResourceProvider {
     Set<Map<String, Object>> propertyMaps = getPropertyMaps(predicate);
 
     if (propertyMaps.isEmpty()) {
-      propertyMaps.add(Collections.<String, Object>emptyMap());
+      propertyMaps.add(Collections.emptyMap());
     }
 
     for (Map<String, Object> propertyMap : propertyMaps) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewVersionResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewVersionResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewVersionResourceProvider.java
index ef51494..e0812fa 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewVersionResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewVersionResourceProvider.java
@@ -123,7 +123,7 @@ public class ViewVersionResourceProvider extends AbstractResourceProvider {
     Set<Map<String, Object>> propertyMaps = getPropertyMaps(predicate);
 
     if (propertyMaps.isEmpty()) {
-      propertyMaps.add(Collections.<String, Object>emptyMap());
+      propertyMaps.add(Collections.emptyMap());
     }
 
     for (Map<String, Object> propertyMap : propertyMaps) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/WidgetLayoutResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/WidgetLayoutResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/WidgetLayoutResourceProvider.java
index 2c5ab2b..8c39fc4 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/WidgetLayoutResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/WidgetLayoutResourceProvider.java
@@ -299,7 +299,7 @@ public class WidgetLayoutResourceProvider extends AbstractControllerResourceProv
               widgetLayoutUserWidgetEntity.getWidget().getListWidgetLayoutUserWidgetEntity()
                       .remove(widgetLayoutUserWidgetEntity);
             }
-            entity.setListWidgetLayoutUserWidgetEntity(new LinkedList<WidgetLayoutUserWidgetEntity>());
+            entity.setListWidgetLayoutUserWidgetEntity(new LinkedList<>());
 
             List<WidgetLayoutUserWidgetEntity> widgetLayoutUserWidgetEntityList = new LinkedList<>();
             int order = 0;

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/ganglia/GangliaComponentPropertyProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/ganglia/GangliaComponentPropertyProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/ganglia/GangliaComponentPropertyProvider.java
index 444875f..aa46412 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/ganglia/GangliaComponentPropertyProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/ganglia/GangliaComponentPropertyProvider.java
@@ -67,6 +67,6 @@ public class GangliaComponentPropertyProvider extends GangliaPropertyProvider {
     
     return new HashSet<>(GANGLIA_CLUSTER_NAME_MAP.containsKey(component) ?
       GANGLIA_CLUSTER_NAME_MAP.get(component) :
-      Collections.<String>emptyList());
+      Collections.emptyList());
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/ganglia/GangliaHostComponentPropertyProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/ganglia/GangliaHostComponentPropertyProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/ganglia/GangliaHostComponentPropertyProvider.java
index 308cdc4..3a5d4e2 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/ganglia/GangliaHostComponentPropertyProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/ganglia/GangliaHostComponentPropertyProvider.java
@@ -66,6 +66,6 @@ public class GangliaHostComponentPropertyProvider extends GangliaPropertyProvide
     
     return new HashSet<>(GANGLIA_CLUSTER_NAME_MAP.containsKey(component) ?
       GANGLIA_CLUSTER_NAME_MAP.get(component) :
-      Collections.<String>emptyList());
+      Collections.emptyList());
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/timeline/AMSPropertyProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/timeline/AMSPropertyProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/timeline/AMSPropertyProvider.java
index 6d859fa..cae330b 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/timeline/AMSPropertyProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/timeline/AMSPropertyProvider.java
@@ -279,7 +279,7 @@ public abstract class AMSPropertyProvider extends MetricsPropertyProvider {
                       && checkMetricName(patterns, metric.getMetricName())) {
                 String hostnameTmp = metric.getHostName();
                 if (!metricsMap.containsKey(hostnameTmp)) {
-                  metricsMap.put(hostnameTmp, new HashSet<TimelineMetric>());
+                  metricsMap.put(hostnameTmp, new HashSet<>());
                 }
                 metricsMap.get(hostnameTmp).add(metric);
               }

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/timeline/MetricsRequestHelper.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/timeline/MetricsRequestHelper.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/timeline/MetricsRequestHelper.java
index 87a4634..71f40e8 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/timeline/MetricsRequestHelper.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/timeline/MetricsRequestHelper.java
@@ -77,7 +77,7 @@ public class MetricsRequestHelper {
     try {
 
       HttpURLConnection connection = streamProvider.processURL(uriBuilder.toString(), HttpMethod.GET,
-        (String) null, Collections.<String, List<String>>emptyMap());
+        (String) null, Collections.emptyMap());
 
       if (!checkConnectionForPrecisionException(connection)) {
         //Try one more time with higher precision
@@ -87,7 +87,7 @@ public class MetricsRequestHelper {
           uriBuilder.setParameter("precision", higherPrecision);
           String newSpec = uriBuilder.toString();
           connection = streamProvider.processURL(newSpec, HttpMethod.GET, (String) null,
-            Collections.<String, List<String>>emptyMap());
+            Collections.emptyMap());
           if (!checkConnectionForPrecisionException(connection)) {
             throw new IOException("Encountered Precision exception : Higher precision request also failed.");
           }

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/timeline/cache/TimelineMetricCacheEntryFactory.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/timeline/cache/TimelineMetricCacheEntryFactory.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/timeline/cache/TimelineMetricCacheEntryFactory.java
index 343587b..2b11f61 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/timeline/cache/TimelineMetricCacheEntryFactory.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/metrics/timeline/cache/TimelineMetricCacheEntryFactory.java
@@ -245,7 +245,7 @@ public class TimelineMetricCacheEntryFactory implements UpdatingCacheEntryFactor
 
     for (TimelineMetric existingMetric : existingMetrics.getMetrics()) {
       if (removeAll) {
-        existingMetric.setMetricValues(new TreeMap<Long, Double>());
+        existingMetric.setMetricValues(new TreeMap<>());
       } else {
         TreeMap<Long, Double> existingMetricValues = existingMetric.getMetricValues();
         LOG.trace("Existing metric: {} # {}", existingMetric.getMetricName(), existingMetricValues.size());

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/PropertyHelper.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/PropertyHelper.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/PropertyHelper.java
index b758ea8..8939780 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/PropertyHelper.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/PropertyHelper.java
@@ -112,7 +112,7 @@ public class PropertyHelper {
 
   public static Set<String> getPropertyIds(Resource.Type resourceType) {
     Set<String> propertyIds = PROPERTY_IDS.get(resourceType.getInternalType());
-    return propertyIds == null ? Collections.<String>emptySet() : propertyIds;
+    return propertyIds == null ? Collections.emptySet() : propertyIds;
   }
 
   public static void setPropertyIds(Resource.Type resourceType, Set<String> propertyIds) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/ScalingThreadPoolExecutor.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/ScalingThreadPoolExecutor.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/ScalingThreadPoolExecutor.java
index 8d59ce6..c377f00 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/ScalingThreadPoolExecutor.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/utilities/ScalingThreadPoolExecutor.java
@@ -67,6 +67,6 @@ public class ScalingThreadPoolExecutor extends ThreadPoolExecutor {
    */
   public ScalingThreadPoolExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime,
       TimeUnit unit, int workerQueueSize) {
-    super(corePoolSize, maximumPoolSize, keepAliveTime, unit, new LinkedBlockingQueue<Runnable>(workerQueueSize));
+    super(corePoolSize, maximumPoolSize, keepAliveTime, unit, new LinkedBlockingQueue<>(workerQueueSize));
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/events/listeners/upgrade/HostVersionOutOfSyncListener.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/events/listeners/upgrade/HostVersionOutOfSyncListener.java b/ambari-server/src/main/java/org/apache/ambari/server/events/listeners/upgrade/HostVersionOutOfSyncListener.java
index 2eb89a2..d4c79db 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/events/listeners/upgrade/HostVersionOutOfSyncListener.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/events/listeners/upgrade/HostVersionOutOfSyncListener.java
@@ -232,7 +232,7 @@ public class HostVersionOutOfSyncListener {
       for (ServiceComponent component : serviceComponents.values()) {
         for (String hostname : component.getServiceComponentHosts().keySet()) {
           if (! affectedHosts.containsKey(hostname)) {
-            affectedHosts.put(hostname, new ArrayList<ServiceComponent>());
+            affectedHosts.put(hostname, new ArrayList<>());
           }
           affectedHosts.get(hostname).add(component);
         }

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/hooks/users/PostUserCreationHookContext.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/hooks/users/PostUserCreationHookContext.java b/ambari-server/src/main/java/org/apache/ambari/server/hooks/users/PostUserCreationHookContext.java
index 1fab600..84e1139 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/hooks/users/PostUserCreationHookContext.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/hooks/users/PostUserCreationHookContext.java
@@ -38,7 +38,7 @@ public class PostUserCreationHookContext implements HookContext {
 
   @AssistedInject
   public PostUserCreationHookContext(@Assisted String userName) {
-    userGroups.put(userName, Collections.<String>emptySet());
+    userGroups.put(userName, Collections.emptySet());
   }
 
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/logging/LockFactory.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/logging/LockFactory.java b/ambari-server/src/main/java/org/apache/ambari/server/logging/LockFactory.java
index b848c28..79efa76 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/logging/LockFactory.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/logging/LockFactory.java
@@ -50,7 +50,7 @@ public class LockFactory {
   @Inject
   public LockFactory(Configuration config) {
     profiling = config.isServerLocksProfilingEnabled();
-    profiledLocks = profiling ? new CopyOnWriteArraySet<ProfiledLock>() : null;
+    profiledLocks = profiling ? new CopyOnWriteArraySet<>() : null;
     LOG.info("Lock profiling is {}", profiling ? "enabled" : "disabled");
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/metadata/RoleCommandOrder.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/metadata/RoleCommandOrder.java b/ambari-server/src/main/java/org/apache/ambari/server/metadata/RoleCommandOrder.java
index ef2c9a9..20edcfd 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/metadata/RoleCommandOrder.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/metadata/RoleCommandOrder.java
@@ -90,7 +90,7 @@ public class RoleCommandOrder implements Cloneable {
     RoleCommandPair rcp2 = new RoleCommandPair(blockerRole, blockerCommand);
 
     if (dependencies.get(rcp1) == null || overrideExisting) {
-      dependencies.put(rcp1, new HashSet<RoleCommandPair>());
+      dependencies.put(rcp1, new HashSet<>());
     }
 
     dependencies.get(rcp1).add(rcp2);

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/notifications/dispatchers/AlertScriptDispatcher.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/notifications/dispatchers/AlertScriptDispatcher.java b/ambari-server/src/main/java/org/apache/ambari/server/notifications/dispatchers/AlertScriptDispatcher.java
index 60fe4f4..3a0f0a0 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/notifications/dispatchers/AlertScriptDispatcher.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/notifications/dispatchers/AlertScriptDispatcher.java
@@ -113,7 +113,7 @@ public class AlertScriptDispatcher implements NotificationDispatcher {
    * The executor responsible for dispatching.
    */
   private final Executor m_executor = new ThreadPoolExecutor(0, 1, 5L, TimeUnit.MINUTES,
-      new LinkedBlockingQueue<Runnable>(), new ScriptDispatchThreadFactory(),
+    new LinkedBlockingQueue<>(), new ScriptDispatchThreadFactory(),
       new ThreadPoolExecutor.CallerRunsPolicy());
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostConfigMappingDAO.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostConfigMappingDAO.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostConfigMappingDAO.java
index 6a731da..5e43473 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostConfigMappingDAO.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostConfigMappingDAO.java
@@ -253,7 +253,7 @@ public class HostConfigMappingDAO {
     
     for (String type : types) {
       if (!mappingsByType.containsKey(type)) {
-        mappingsByType.put(type, new ArrayList<HostConfigMapping>());
+        mappingsByType.put(type, new ArrayList<>());
       }
     }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostRoleCommandDAO.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostRoleCommandDAO.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostRoleCommandDAO.java
index 7ac4b71..f634d89 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostRoleCommandDAO.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostRoleCommandDAO.java
@@ -430,7 +430,7 @@ public class HostRoleCommandDAO {
 
     for (HostRoleCommandEntity commandEntity : commandEntities) {
       if (!hostCommands.containsKey(commandEntity.getHostName())) {
-        hostCommands.put(commandEntity.getHostName(), new ArrayList<HostRoleCommandEntity>());
+        hostCommands.put(commandEntity.getHostName(), new ArrayList<>());
       }
 
       hostCommands.get(commandEntity.getHostName()).add(commandEntity);

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ArtifactEntity.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ArtifactEntity.java b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ArtifactEntity.java
index 326257d..5420178 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ArtifactEntity.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ArtifactEntity.java
@@ -122,7 +122,7 @@ public class ArtifactEntity {
    */
   public Map<String, String> getForeignKeys() {
     return foreignKeys == null ?
-        Collections.<String, String>emptyMap() :
+        Collections.emptyMap() :
         jsonSerializer.<Map<String, String>>fromJson(foreignKeys, Map.class);
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/security/authentication/AmbariDelegatingAuthenticationFilter.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/security/authentication/AmbariDelegatingAuthenticationFilter.java b/ambari-server/src/main/java/org/apache/ambari/server/security/authentication/AmbariDelegatingAuthenticationFilter.java
index 141503a..90ad853 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/security/authentication/AmbariDelegatingAuthenticationFilter.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/security/authentication/AmbariDelegatingAuthenticationFilter.java
@@ -58,7 +58,7 @@ public class AmbariDelegatingAuthenticationFilter implements Filter {
    */
   public AmbariDelegatingAuthenticationFilter(Collection<AmbariAuthenticationFilter> filters) {
 
-    this.filters = (filters == null) ? Collections.<AmbariAuthenticationFilter>emptyList() : filters;
+    this.filters = (filters == null) ? Collections.emptyList() : filters;
 
     if (this.filters.isEmpty()) {
       LOG.warn("The delegated filters list is empty. No authentication tests will be performed by this " +

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/PermissionHelper.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/PermissionHelper.java b/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/PermissionHelper.java
index 3531fda..e1b6a5f 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/PermissionHelper.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/PermissionHelper.java
@@ -80,7 +80,7 @@ public class PermissionHelper {
 
         if(key != null) {
           if(!permissionLabels.containsKey(key)) {
-            permissionLabels.put(key, new LinkedList<String>());
+            permissionLabels.put(key, new LinkedList<>());
           }
           permissionLabels.get(key).add(privilegeEntity.getPermission().getPermissionLabel());
         }


Mime
View raw message