ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aonis...@apache.org
Subject [24/55] [abbrv] ambari git commit: AMBARI-19149. Code cleanup: redundant type arguments
Date Fri, 31 Mar 2017 07:22:31 GMT
http://git-wip-us.apache.org/repos/asf/ambari/blob/e8080350/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackArtifactResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackArtifactResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackArtifactResourceProvider.java
index e997cb3..63d6994 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackArtifactResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackArtifactResourceProvider.java
@@ -111,18 +111,18 @@ public class StackArtifactResourceProvider extends AbstractControllerResourcePro
   /**
    * primary key fields
    */
-  public static Set<String> pkPropertyIds = new HashSet<String>();
+  public static Set<String> pkPropertyIds = new HashSet<>();
 
   /**
    * map of resource type to fk field
    */
   public static Map<Resource.Type, String> keyPropertyIds =
-      new HashMap<Resource.Type, String>();
+    new HashMap<>();
 
   /**
    * resource properties
    */
-  public static Set<String> propertyIds = new HashSet<String>();
+  public static Set<String> propertyIds = new HashSet<>();
 
   /**
    * name of the kerberos descriptor artifact.
@@ -191,7 +191,7 @@ public class StackArtifactResourceProvider extends AbstractControllerResourcePro
              NoSuchResourceException,
              NoSuchParentResourceException {
 
-    Set<Resource> resources = new HashSet<Resource>();
+    Set<Resource> resources = new HashSet<>();
 
     resources.addAll(getKerberosDescriptors(request, predicate));
     resources.addAll(getMetricsDescriptors(request, predicate));
@@ -260,7 +260,7 @@ public class StackArtifactResourceProvider extends AbstractControllerResourcePro
              NoSuchParentResourceException,
              NoSuchResourceException {
 
-    Set<Resource> resources = new HashSet<Resource>();
+    Set<Resource> resources = new HashSet<>();
 
     for (Map<String, Object> properties : getPropertyMaps(predicate)) {
       String artifactName = (String) properties.get(ARTIFACT_NAME_PROPERTY_ID);
@@ -312,7 +312,7 @@ public class StackArtifactResourceProvider extends AbstractControllerResourcePro
       throws SystemException, UnsupportedPropertyException,
            NoSuchParentResourceException, NoSuchResourceException {
 
-    Set<Resource> resources = new HashSet<Resource>();
+    Set<Resource> resources = new HashSet<>();
 
     for (Map<String, Object> properties : getPropertyMaps(predicate)) {
       String artifactName = (String) properties.get(ARTIFACT_NAME_PROPERTY_ID);
@@ -348,7 +348,7 @@ public class StackArtifactResourceProvider extends AbstractControllerResourcePro
             Map<String, Map<String, PropertyInfo>> hostMetrics =
               PropertyHelper.getMetricPropertyIds(Resource.Type.Host);
 
-            descriptor = new HashMap<String, Object>();
+            descriptor = new HashMap<>();
             descriptor.put(Resource.Type.Cluster.name(), clusterMetrics);
             descriptor.put(Resource.Type.Host.name(), hostMetrics);
           }
@@ -379,7 +379,7 @@ public class StackArtifactResourceProvider extends AbstractControllerResourcePro
       throws SystemException, UnsupportedPropertyException,
              NoSuchParentResourceException, NoSuchResourceException {
 
-    Set<Resource> resources = new HashSet<Resource>();
+    Set<Resource> resources = new HashSet<>();
 
     for (Map<String, Object> properties : getPropertyMaps(predicate)) {
       String artifactName = (String) properties.get(ARTIFACT_NAME_PROPERTY_ID);
@@ -581,7 +581,7 @@ public class StackArtifactResourceProvider extends AbstractControllerResourcePro
    * @throws IOException if unable to read or parse a descriptor file
    */
   private Collection<KerberosServiceDescriptor> getServiceDescriptors(StackInfo stack) throws IOException {
-    Collection<KerberosServiceDescriptor> serviceDescriptors = new ArrayList<KerberosServiceDescriptor>();
+    Collection<KerberosServiceDescriptor> serviceDescriptors = new ArrayList<>();
     for (ServiceInfo service : stack.getServices()) {
       File descriptorFile = service.getKerberosDescriptorFile();
       if (descriptorFile != null) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/e8080350/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 0712bf7..093aea4 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
@@ -60,10 +60,10 @@ public class StackConfigurationDependencyResourceProvider extends
   public static final String DEPENDENCY_TYPE_PROPERTY_ID = PropertyHelper
       .getPropertyId("StackConfigurationDependency", "dependency_type");
 
-  private static Set<String> pkPropertyIds = new HashSet<String>(
-      Arrays.asList(new String[] { STACK_NAME_PROPERTY_ID,
-          STACK_VERSION_PROPERTY_ID, SERVICE_NAME_PROPERTY_ID,
-          PROPERTY_NAME_PROPERTY_ID, DEPENDENCY_NAME_PROPERTY_ID }));
+  private static Set<String> pkPropertyIds = new HashSet<>(
+    Arrays.asList(new String[]{STACK_NAME_PROPERTY_ID,
+      STACK_VERSION_PROPERTY_ID, SERVICE_NAME_PROPERTY_ID,
+      PROPERTY_NAME_PROPERTY_ID, DEPENDENCY_NAME_PROPERTY_ID}));
 
   protected StackConfigurationDependencyResourceProvider(Set<String> propertyIds,
                                                          Map<Type, String> keyPropertyIds,
@@ -77,7 +77,7 @@ public class StackConfigurationDependencyResourceProvider extends
       NoSuchResourceException, NoSuchParentResourceException {
 
     final Set<StackConfigurationDependencyRequest> requests =
-      new HashSet<StackConfigurationDependencyRequest>();
+      new HashSet<>();
 
     if (predicate == null) {
       requests.add(getRequest(Collections.<String, Object>emptyMap()));
@@ -96,7 +96,7 @@ public class StackConfigurationDependencyResourceProvider extends
       }
     });
 
-    Set<Resource> resources = new HashSet<Resource>();
+    Set<Resource> resources = new HashSet<>();
 
     for (StackConfigurationDependencyResponse response : responses) {
       Resource resource = new ResourceImpl(Type.StackConfigurationDependency);

http://git-wip-us.apache.org/repos/asf/ambari/blob/e8080350/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 bb115f1..de8e166 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
@@ -80,9 +80,9 @@ public class StackConfigurationResourceProvider extends
       .getPropertyId("StackConfigurations", "final");
 
 
-  private static Set<String> pkPropertyIds = new HashSet<String>(
-      Arrays.asList(new String[] { STACK_NAME_PROPERTY_ID,
-          STACK_VERSION_PROPERTY_ID, SERVICE_NAME_PROPERTY_ID, PROPERTY_NAME_PROPERTY_ID }));
+  private static Set<String> pkPropertyIds = new HashSet<>(
+    Arrays.asList(new String[]{STACK_NAME_PROPERTY_ID,
+      STACK_VERSION_PROPERTY_ID, SERVICE_NAME_PROPERTY_ID, PROPERTY_NAME_PROPERTY_ID}));
 
   protected StackConfigurationResourceProvider(Set<String> propertyIds,
       Map<Type, String> keyPropertyIds,
@@ -96,7 +96,7 @@ public class StackConfigurationResourceProvider extends
       throws SystemException, UnsupportedPropertyException,
       NoSuchResourceException, NoSuchParentResourceException {
 
-    final Set<StackConfigurationRequest> requests = new HashSet<StackConfigurationRequest>();
+    final Set<StackConfigurationRequest> requests = new HashSet<>();
 
     if (predicate == null) {
       requests.add(getRequest(Collections.<String, Object>emptyMap()));
@@ -115,7 +115,7 @@ public class StackConfigurationResourceProvider extends
       }
     });
 
-    Set<Resource> resources = new HashSet<Resource>();
+    Set<Resource> resources = new HashSet<>();
     
     for (StackConfigurationResponse response : responses) {
       Resource resource = new ResourceImpl(Resource.Type.StackConfiguration);

http://git-wip-us.apache.org/repos/asf/ambari/blob/e8080350/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackDefinedPropertyProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackDefinedPropertyProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackDefinedPropertyProvider.java
index f5040e5..8972ca2 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackDefinedPropertyProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackDefinedPropertyProvider.java
@@ -149,10 +149,10 @@ public class StackDefinedPropertyProvider implements PropertyProvider {
       Request request, Predicate predicate) throws SystemException {
 
     // only arrange for one instance of Ganglia and JMX instantiation
-    Map<String, Map<String, PropertyInfo>> gangliaMap = new HashMap<String, Map<String, PropertyInfo>>();
-    Map<String, Map<String, PropertyInfo>> jmxMap = new HashMap<String, Map<String, PropertyInfo>>();
+    Map<String, Map<String, PropertyInfo>> gangliaMap = new HashMap<>();
+    Map<String, Map<String, PropertyInfo>> jmxMap = new HashMap<>();
 
-    List<PropertyProvider> additional = new ArrayList<PropertyProvider>();
+    List<PropertyProvider> additional = new ArrayList<>();
 
     try {
       for (Resource r : resources) {
@@ -245,7 +245,7 @@ public class StackDefinedPropertyProvider implements PropertyProvider {
    * Format: <metric name, property info>
    */
   public static Map<String, PropertyInfo> getPropertyInfo(MetricDefinition def) {
-    Map<String, PropertyInfo> defs = new HashMap<String, PropertyInfo>();
+    Map<String, PropertyInfo> defs = new HashMap<>();
 
     for (Entry<String, Metric> entry : def.getMetrics().entrySet()) {
       Metric metric = entry.getValue();
@@ -320,7 +320,7 @@ public class StackDefinedPropertyProvider implements PropertyProvider {
                                        String componentName) {
     Map<String, PropertyInfo> metrics = getPropertyInfo(definition);
     HashMap<String, Map<String, PropertyInfo>> componentMetrics =
-        new HashMap<String, Map<String, PropertyInfo>>();
+      new HashMap<>();
     componentMetrics.put(WRAPPED_METRICS_KEY, metrics);
 
     try {

http://git-wip-us.apache.org/repos/asf/ambari/blob/e8080350/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackDependencyResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackDependencyResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackDependencyResourceProvider.java
index d9cd557..bc7492c 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackDependencyResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StackDependencyResourceProvider.java
@@ -72,8 +72,8 @@ public class StackDependencyResourceProvider extends AbstractResourceProvider {
 
   // Primary Key Fields
   private static Set<String> pkPropertyIds =
-      new HashSet<String>(Arrays.asList(new String[]{
-          SERVICE_NAME_ID, COMPONENT_NAME_ID}));
+    new HashSet<>(Arrays.asList(new String[]{
+      SERVICE_NAME_ID, COMPONENT_NAME_ID}));
 
   /**
    * Provides stack information
@@ -116,7 +116,7 @@ public class StackDependencyResourceProvider extends AbstractResourceProvider {
       throws SystemException, UnsupportedPropertyException,
              NoSuchResourceException, NoSuchParentResourceException {
 
-    Set<Resource> resources = new HashSet<Resource>();
+    Set<Resource> resources = new HashSet<>();
     Set<Map<String, Object>> requestProps = getPropertyMaps(predicate);
 
     for (Map<String, Object> properties : requestProps) {
@@ -187,7 +187,7 @@ public class StackDependencyResourceProvider extends AbstractResourceProvider {
     final String dependentComponent = (String)  properties.get(DEPENDENT_COMPONENT_NAME_ID);
     final String dependencyName = (String) properties.get(COMPONENT_NAME_ID);
 
-    List<DependencyInfo> dependencies = new ArrayList<DependencyInfo>();
+    List<DependencyInfo> dependencies = new ArrayList<>();
     if (dependencyName != null) {
       dependencies.add(getResources(new Command<DependencyInfo>() {
         @Override
@@ -206,7 +206,7 @@ public class StackDependencyResourceProvider extends AbstractResourceProvider {
       }));
     }
 
-    Collection<Resource> resources = new ArrayList<Resource>();
+    Collection<Resource> resources = new ArrayList<>();
     for (DependencyInfo dependency : dependencies) {
       if (dependency != null) {
         resources.add(toResource(dependency, stackName, version, dependentService,

http://git-wip-us.apache.org/repos/asf/ambari/blob/e8080350/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 0ecf05b..afce88e 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
@@ -77,9 +77,9 @@ public class StackLevelConfigurationResourceProvider extends
       .getPropertyId("StackLevelConfigurations", "final");
 
 
-  private static Set<String> pkPropertyIds = new HashSet<String>(
-      Arrays.asList(new String[] { STACK_NAME_PROPERTY_ID,
-          STACK_VERSION_PROPERTY_ID, PROPERTY_NAME_PROPERTY_ID }));
+  private static Set<String> pkPropertyIds = new HashSet<>(
+    Arrays.asList(new String[]{STACK_NAME_PROPERTY_ID,
+      STACK_VERSION_PROPERTY_ID, PROPERTY_NAME_PROPERTY_ID}));
 
   protected StackLevelConfigurationResourceProvider(Set<String> propertyIds,
       Map<Type, String> keyPropertyIds,
@@ -93,7 +93,7 @@ public class StackLevelConfigurationResourceProvider extends
       throws SystemException, UnsupportedPropertyException,
       NoSuchResourceException, NoSuchParentResourceException {
 
-    final Set<StackLevelConfigurationRequest> requests = new HashSet<StackLevelConfigurationRequest>();
+    final Set<StackLevelConfigurationRequest> requests = new HashSet<>();
 
     if (predicate == null) {
       requests.add(getRequest(Collections.<String, Object>emptyMap()));
@@ -112,7 +112,7 @@ public class StackLevelConfigurationResourceProvider extends
       }
     });
 
-    Set<Resource> resources = new HashSet<Resource>();
+    Set<Resource> resources = new HashSet<>();
     
     for (StackConfigurationResponse response : responses) {
       Resource resource = new ResourceImpl(Resource.Type.StackLevelConfiguration);

http://git-wip-us.apache.org/repos/asf/ambari/blob/e8080350/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 0c2d3d1..01f31a9 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
@@ -45,8 +45,8 @@ public class StackResourceProvider extends ReadOnlyResourceProvider {
   public static final String STACK_NAME_PROPERTY_ID = PropertyHelper
       .getPropertyId("Stacks", "stack_name");
 
-  private static Set<String> pkPropertyIds = new HashSet<String>(
-      Arrays.asList(new String[] { STACK_NAME_PROPERTY_ID }));
+  private static Set<String> pkPropertyIds = new HashSet<>(
+    Arrays.asList(new String[]{STACK_NAME_PROPERTY_ID}));
 
   protected StackResourceProvider(Set<String> propertyIds,
       Map<Type, String> keyPropertyIds,
@@ -60,7 +60,7 @@ public class StackResourceProvider extends ReadOnlyResourceProvider {
       throws SystemException, UnsupportedPropertyException,
       NoSuchResourceException, NoSuchParentResourceException {
 
-    final Set<StackRequest> requests = new HashSet<StackRequest>();
+    final Set<StackRequest> requests = new HashSet<>();
 
     if (predicate == null) {
       requests.add(getRequest(Collections.<String, Object>emptyMap()));
@@ -79,7 +79,7 @@ public class StackResourceProvider extends ReadOnlyResourceProvider {
       }
     });
 
-    Set<Resource> resources = new HashSet<Resource>();
+    Set<Resource> resources = new HashSet<>();
 
     for (StackResponse response : responses) {
       Resource resource = new ResourceImpl(Resource.Type.Stack);

http://git-wip-us.apache.org/repos/asf/ambari/blob/e8080350/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 c731641..6e625bc 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
@@ -99,10 +99,10 @@ public class StackServiceComponentResourceProvider extends
   private static final String AUTO_DEPLOY_LOCATION_ID = PropertyHelper.getPropertyId(
       "auto_deploy", "location");
 
-  private static Set<String> pkPropertyIds = new HashSet<String>(
-      Arrays.asList(new String[] { STACK_NAME_PROPERTY_ID,
-          STACK_VERSION_PROPERTY_ID, SERVICE_NAME_PROPERTY_ID,
-          COMPONENT_NAME_PROPERTY_ID }));
+  private static Set<String> pkPropertyIds = new HashSet<>(
+    Arrays.asList(new String[]{STACK_NAME_PROPERTY_ID,
+      STACK_VERSION_PROPERTY_ID, SERVICE_NAME_PROPERTY_ID,
+      COMPONENT_NAME_PROPERTY_ID}));
 
   protected StackServiceComponentResourceProvider(Set<String> propertyIds,
       Map<Type, String> keyPropertyIds,
@@ -115,7 +115,7 @@ public class StackServiceComponentResourceProvider extends
   public Set<Resource> getResources(Request request, Predicate predicate)
       throws SystemException, UnsupportedPropertyException,
       NoSuchResourceException, NoSuchParentResourceException {
-    final Set<StackServiceComponentRequest> requests = new HashSet<StackServiceComponentRequest>();
+    final Set<StackServiceComponentRequest> requests = new HashSet<>();
 
     if (predicate == null) {
       requests.add(getRequest(Collections.<String, Object>emptyMap()));
@@ -134,7 +134,7 @@ public class StackServiceComponentResourceProvider extends
       }
     });
 
-    Set<Resource> resources = new HashSet<Resource>();
+    Set<Resource> resources = new HashSet<>();
 
     for (StackServiceComponentResponse response : responses) {
       Resource resource = new ResourceImpl(Resource.Type.StackServiceComponent);

http://git-wip-us.apache.org/repos/asf/ambari/blob/e8080350/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 9a53725..a30d783 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
@@ -98,9 +98,9 @@ public class StackServiceResourceProvider extends ReadOnlyResourceProvider {
   private static final String CREDENTIAL_STORE_ENABLED = PropertyHelper.getPropertyId(
       "StackServices", "credential_store_enabled");
 
-  private static Set<String> pkPropertyIds = new HashSet<String>(
-      Arrays.asList(new String[]{STACK_NAME_PROPERTY_ID,
-        STACK_VERSION_PROPERTY_ID, SERVICE_NAME_PROPERTY_ID}));
+  private static Set<String> pkPropertyIds = new HashSet<>(
+    Arrays.asList(new String[]{STACK_NAME_PROPERTY_ID,
+      STACK_VERSION_PROPERTY_ID, SERVICE_NAME_PROPERTY_ID}));
 
   /**
    * KerberosServiceDescriptorFactory used to create KerberosServiceDescriptor instances
@@ -119,7 +119,7 @@ public class StackServiceResourceProvider extends ReadOnlyResourceProvider {
       throws SystemException, UnsupportedPropertyException,
     NoSuchResourceException, NoSuchParentResourceException {
 
-    final Set<StackServiceRequest> requests = new HashSet<StackServiceRequest>();
+    final Set<StackServiceRequest> requests = new HashSet<>();
 
     if (predicate == null) {
       requests.add(getRequest(Collections.<String, Object>emptyMap()));
@@ -138,7 +138,7 @@ public class StackServiceResourceProvider extends ReadOnlyResourceProvider {
       }
     });
 
-    Set<Resource> resources = new HashSet<Resource>();
+    Set<Resource> resources = new HashSet<>();
 
     for (StackServiceResponse response : responses) {
       Resource resource = createResource(response, requestedIds);

http://git-wip-us.apache.org/repos/asf/ambari/blob/e8080350/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 b56b7ac..36fd0b1 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
@@ -64,8 +64,8 @@ public class StackVersionResourceProvider extends ReadOnlyResourceProvider {
   public static final String STACK_MIN_JDK     = PropertyHelper.getPropertyId("Versions", "min_jdk");
   public static final String STACK_MAX_JDK     = PropertyHelper.getPropertyId("Versions", "max_jdk");
 
-  private static Set<String> pkPropertyIds = new HashSet<String>(
-      Arrays.asList(new String[] { STACK_NAME_PROPERTY_ID, STACK_VERSION_PROPERTY_ID }));
+  private static Set<String> pkPropertyIds = new HashSet<>(
+    Arrays.asList(new String[]{STACK_NAME_PROPERTY_ID, STACK_VERSION_PROPERTY_ID}));
 
   /**
    * KerberosDescriptorFactory used to create KerberosDescriptor instances
@@ -90,7 +90,7 @@ public class StackVersionResourceProvider extends ReadOnlyResourceProvider {
       throws SystemException, UnsupportedPropertyException,
       NoSuchResourceException, NoSuchParentResourceException {
 
-    final Set<StackVersionRequest> requests = new HashSet<StackVersionRequest>();
+    final Set<StackVersionRequest> requests = new HashSet<>();
 
     if (predicate == null) {
       requests.add(getRequest(Collections.<String, Object>emptyMap()));
@@ -109,7 +109,7 @@ public class StackVersionResourceProvider extends ReadOnlyResourceProvider {
       }
     });
 
-    Set<Resource> resources = new HashSet<Resource>();
+    Set<Resource> resources = new HashSet<>();
 
     for (StackVersionResponse response : responses) {
       Resource resource = new ResourceImpl(Resource.Type.StackVersion);

http://git-wip-us.apache.org/repos/asf/ambari/blob/e8080350/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StageResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StageResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StageResourceProvider.java
index a778882..8759844 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StageResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StageResourceProvider.java
@@ -104,13 +104,13 @@ public class StageResourceProvider extends AbstractControllerResourceProvider im
   /**
    * The property ids for a stage resource.
    */
-  static final Set<String> PROPERTY_IDS = new HashSet<String>();
+  static final Set<String> PROPERTY_IDS = new HashSet<>();
 
   /**
    * The key property ids for a stage resource.
    */
   private static final Map<Resource.Type, String> KEY_PROPERTY_IDS =
-      new HashMap<Resource.Type, String>();
+    new HashMap<>();
 
   static {
     // properties
@@ -155,7 +155,7 @@ public class StageResourceProvider extends AbstractControllerResourceProvider im
 
   @Override
   protected Set<String> getPKPropertyIds() {
-    return new HashSet<String>(KEY_PROPERTY_IDS.values());
+    return new HashSet<>(KEY_PROPERTY_IDS.values());
   }
 
 
@@ -206,13 +206,13 @@ public class StageResourceProvider extends AbstractControllerResourceProvider im
       throws SystemException, UnsupportedPropertyException,
       NoSuchResourceException, NoSuchParentResourceException {
 
-    Set<Resource> results     = new LinkedHashSet<Resource>();
+    Set<Resource> results     = new LinkedHashSet<>();
     Set<String>   propertyIds = getRequestPropertyIds(request, predicate);
 
     // !!! poor mans cache.  toResource() shouldn't be calling the db
     // every time, when the request id is likely the same for each stageEntity
     Map<Long, Map<Long, HostRoleCommandStatusSummaryDTO>> cache =
-        new HashMap<Long, Map<Long, HostRoleCommandStatusSummaryDTO>>();
+      new HashMap<>();
 
     List<StageEntity> entities = dao.findAll(request, predicate);
     for (StageEntity entity : entities) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/e8080350/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/TargetClusterResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/TargetClusterResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/TargetClusterResourceProvider.java
index 7c3145b..0a44041 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/TargetClusterResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/TargetClusterResourceProvider.java
@@ -53,8 +53,8 @@ public class TargetClusterResourceProvider extends AbstractDRResourceProvider {
   protected static final String CLUSTER_PROPERTIES_PROPERTY_ID = PropertyHelper.getPropertyId("Cluster", "properties");
 
   private static Set<String> pkPropertyIds =
-      new HashSet<String>(Arrays.asList(new String[]{
-          CLUSTER_NAME_PROPERTY_ID }));
+    new HashSet<>(Arrays.asList(new String[]{
+      CLUSTER_NAME_PROPERTY_ID}));
 
   /**
    * Construct a provider.
@@ -88,7 +88,7 @@ public class TargetClusterResourceProvider extends AbstractDRResourceProvider {
     IvoryService  service         = getService();
     List<String>  clusterNames    = service.getClusterNames();
     Set<String>   requestedIds = getRequestPropertyIds(request, predicate);
-    Set<Resource> resources    = new HashSet<Resource>();
+    Set<Resource> resources    = new HashSet<>();
 
     for (String clusterName : clusterNames ) {
 
@@ -159,7 +159,7 @@ public class TargetClusterResourceProvider extends AbstractDRResourceProvider {
 
   protected static Cluster getCluster(String clusterName, Map<String, Object> propertyMap) {
 
-    Map<String, String> properties = new HashMap<String, String>();
+    Map<String, String> properties = new HashMap<>();
     for ( Map.Entry<String, Object> entry : propertyMap.entrySet()) {
       String property = entry.getKey();
       String category = PropertyHelper.getPropertyCategory(property);
@@ -177,7 +177,7 @@ public class TargetClusterResourceProvider extends AbstractDRResourceProvider {
   }
 
   protected static Set<Cluster.Interface> getInterfaces(Set<Map<String, Object>> maps) {
-    Set<Cluster.Interface> interfaces = new HashSet<Cluster.Interface>();
+    Set<Cluster.Interface> interfaces = new HashSet<>();
     for (Map<String, Object> map : maps) {
       interfaces.add(new Cluster.Interface((String) map.get("type"), (String) map.get("endpoint"), (String) map.get("version")));
     }
@@ -185,7 +185,7 @@ public class TargetClusterResourceProvider extends AbstractDRResourceProvider {
   }
 
   protected static Set<Cluster.Location> getLocations(Set<Map<String, Object>> maps) {
-    Set<Cluster.Location> locations = new HashSet<Cluster.Location>();
+    Set<Cluster.Location> locations = new HashSet<>();
     for (Map<String, Object> map : maps) {
       locations.add(new Cluster.Location((String) map.get("name"), (String) map.get("path")));
     }

http://git-wip-us.apache.org/repos/asf/ambari/blob/e8080350/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/TaskAttemptResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/TaskAttemptResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/TaskAttemptResourceProvider.java
index 146be90..32b7fec 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/TaskAttemptResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/TaskAttemptResourceProvider.java
@@ -81,10 +81,10 @@ public class TaskAttemptResourceProvider extends
   protected static final String TASK_ATTEMPT_LOCALITY_PROPERTY_ID = PropertyHelper
       .getPropertyId("TaskAttempt", "locality");
 
-  private static final Set<String> pkPropertyIds = new HashSet<String>(
-      Arrays.asList(new String[] {TASK_ATTEMPT_CLUSTER_NAME_PROPERTY_ID,
-          TASK_ATTEMPT_WORKFLOW_ID_PROPERTY_ID,
-          TASK_ATTEMPT_JOB_ID_PROPERTY_ID, TASK_ATTEMPT_ID_PROPERTY_ID}));
+  private static final Set<String> pkPropertyIds = new HashSet<>(
+    Arrays.asList(new String[]{TASK_ATTEMPT_CLUSTER_NAME_PROPERTY_ID,
+      TASK_ATTEMPT_WORKFLOW_ID_PROPERTY_ID,
+      TASK_ATTEMPT_JOB_ID_PROPERTY_ID, TASK_ATTEMPT_ID_PROPERTY_ID}));
 
   protected TaskAttemptFetcher taskAttemptFetcher;
 
@@ -131,7 +131,7 @@ public class TaskAttemptResourceProvider extends
       throws SystemException, UnsupportedPropertyException,
       NoSuchResourceException, NoSuchParentResourceException {
 
-    Set<Resource> resourceSet = new HashSet<Resource>();
+    Set<Resource> resourceSet = new HashSet<>();
     Set<String> requestedIds = getRequestPropertyIds(request, predicate);
 
     Set<Map<String,Object>> predicatePropertieSet = getPropertyMaps(predicate);
@@ -171,7 +171,7 @@ public class TaskAttemptResourceProvider extends
 
   @Override
   public Map<Type,String> getKeyPropertyIds() {
-    Map<Type,String> keyPropertyIds = new HashMap<Type,String>();
+    Map<Type,String> keyPropertyIds = new HashMap<>();
     keyPropertyIds.put(Type.Cluster, TASK_ATTEMPT_CLUSTER_NAME_PROPERTY_ID);
     keyPropertyIds.put(Type.Workflow, TASK_ATTEMPT_WORKFLOW_ID_PROPERTY_ID);
     keyPropertyIds.put(Type.Job, TASK_ATTEMPT_JOB_ID_PROPERTY_ID);
@@ -265,7 +265,7 @@ public class TaskAttemptResourceProvider extends
     public Set<Resource> fetchTaskAttemptDetails(Set<String> requestedIds,
         String clusterName, String workflowId, String jobId,
         String taskAttemptId) {
-      Set<Resource> taskAttempts = new HashSet<Resource>();
+      Set<Resource> taskAttempts = new HashSet<>();
       ResultSet rs = null;
       try {
         rs = getResultSet(requestedIds, workflowId, jobId, taskAttemptId);
@@ -335,7 +335,7 @@ public class TaskAttemptResourceProvider extends
 
   @Override
   protected Map<String,TaskAttemptFields> getDBFieldMap() {
-    Map<String,TaskAttemptFields> dbFields = new HashMap<String,TaskAttemptFields>();
+    Map<String,TaskAttemptFields> dbFields = new HashMap<>();
     dbFields.put(TASK_ATTEMPT_JOB_ID_PROPERTY_ID, TaskAttemptFields.JOBID);
     dbFields.put(TASK_ATTEMPT_ID_PROPERTY_ID, TaskAttemptFields.TASKATTEMPTID);
     dbFields.put(TASK_ATTEMPT_TYPE_PROPERTY_ID, TaskAttemptFields.TASKTYPE);

http://git-wip-us.apache.org/repos/asf/ambari/blob/e8080350/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/TaskResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/TaskResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/TaskResourceProvider.java
index 3f3f282..20b0417 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/TaskResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/TaskResourceProvider.java
@@ -77,13 +77,13 @@ public class TaskResourceProvider extends AbstractControllerResourceProvider {
   public static final String TASK_CUST_CMD_NAME_PROPERTY_ID  = PropertyHelper.getPropertyId("Tasks", "custom_command_name");
 
   private static Set<String> pkPropertyIds =
-      new HashSet<String>(Arrays.asList(new String[]{
-          TASK_ID_PROPERTY_ID}));
+    new HashSet<>(Arrays.asList(new String[]{
+      TASK_ID_PROPERTY_ID}));
 
   /**
    * The property ids for a task resource.
    */
-  static final Set<String> PROPERTY_IDS = new HashSet<String>();
+  static final Set<String> PROPERTY_IDS = new HashSet<>();
 
   // These are static so that they can be referenced by other classes such as UpgradeSummaryResourceProvider.java
   static {
@@ -158,7 +158,7 @@ public class TaskResourceProvider extends AbstractControllerResourceProvider {
   public Set<Resource> getResources(Request request, Predicate predicate)
       throws SystemException, UnsupportedPropertyException, NoSuchResourceException, NoSuchParentResourceException {
 
-    Set<Resource> results = new LinkedHashSet<Resource>();
+    Set<Resource> results = new LinkedHashSet<>();
     Set<String> requestedIds = getRequestPropertyIds(request, predicate);
 
     List<HostRoleCommandEntity> entities = s_dao.findAll(request, predicate);

http://git-wip-us.apache.org/repos/asf/ambari/blob/e8080350/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ThemeArtifactResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ThemeArtifactResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ThemeArtifactResourceProvider.java
index aaa40d0..fc7cfe7 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ThemeArtifactResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ThemeArtifactResourceProvider.java
@@ -54,17 +54,17 @@ public class ThemeArtifactResourceProvider extends AbstractControllerResourcePro
   /**
    * primary key fields
    */
-  public static Set<String> pkPropertyIds = new HashSet<String>();
+  public static Set<String> pkPropertyIds = new HashSet<>();
   /**
    * map of resource type to fk field
    */
   public static Map<Resource.Type, String> keyPropertyIds =
-    new HashMap<Resource.Type, String>();
+    new HashMap<>();
 
   /**
    * resource properties
    */
-  public static Set<String> propertyIds = new HashSet<String>();
+  public static Set<String> propertyIds = new HashSet<>();
 
   static {
     keyPropertyIds.put(Resource.Type.Theme, THEME_FILE_NAME_PROPERTY_ID);
@@ -102,7 +102,7 @@ public class ThemeArtifactResourceProvider extends AbstractControllerResourcePro
   public Set<Resource> getResources(Request request, Predicate predicate) throws SystemException, UnsupportedPropertyException, NoSuchResourceException,
       NoSuchParentResourceException {
 
-    Set<Resource> resources = new LinkedHashSet<Resource>();
+    Set<Resource> resources = new LinkedHashSet<>();
 
     resources.addAll(getThemes(request, predicate));
     // add other artifacts types here
@@ -130,7 +130,7 @@ public class ThemeArtifactResourceProvider extends AbstractControllerResourcePro
   private Set<Resource> getThemes(Request request, Predicate predicate) throws NoSuchParentResourceException,
     NoSuchResourceException, UnsupportedPropertyException, SystemException {
 
-    Set<Resource> resources = new LinkedHashSet<Resource>();
+    Set<Resource> resources = new LinkedHashSet<>();
     for (Map<String, Object> properties : getPropertyMaps(predicate)) {
       String themeFileName = (String) properties.get(THEME_FILE_NAME_PROPERTY_ID);
 
@@ -147,7 +147,7 @@ public class ThemeArtifactResourceProvider extends AbstractControllerResourcePro
           "Parent stack resource doesn't exist: stackName='%s', stackVersion='%s'", stackName, stackVersion));
       }
 
-      List<ServiceInfo> serviceInfoList = new ArrayList<ServiceInfo>();
+      List<ServiceInfo> serviceInfoList = new ArrayList<>();
 
       if (stackService == null) {
         serviceInfoList.addAll(stackInfo.getServices());
@@ -162,7 +162,7 @@ public class ThemeArtifactResourceProvider extends AbstractControllerResourcePro
       }
 
       for (ServiceInfo serviceInfo : serviceInfoList) {
-        List<ThemeInfo> serviceThemes = new ArrayList<ThemeInfo>();
+        List<ThemeInfo> serviceThemes = new ArrayList<>();
         if (themeFileName != null) {
           LOG.debug("Getting themes from service {}, themes = {}", serviceInfo.getName(), serviceInfo.getThemesMap());
           serviceThemes.add(serviceInfo.getThemesMap().get(themeFileName));
@@ -176,7 +176,7 @@ public class ThemeArtifactResourceProvider extends AbstractControllerResourcePro
           }
         }
 
-        List<Resource> serviceResources = new ArrayList<Resource>();
+        List<Resource> serviceResources = new ArrayList<>();
         for (ThemeInfo themeInfo : serviceThemes) {
           Resource resource = new ResourceImpl(Resource.Type.Theme);
           Set<String> requestedIds = getRequestPropertyIds(request, predicate);

http://git-wip-us.apache.org/repos/asf/ambari/blob/e8080350/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/URLStreamProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/URLStreamProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/URLStreamProvider.java
index 501aa04..356dfdd 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/URLStreamProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/URLStreamProvider.java
@@ -191,7 +191,7 @@ public class URLStreamProvider implements StreamProvider {
       if (headers == null || headers.isEmpty()) {
         headers = Collections.singletonMap(COOKIE, Collections.singletonList(appCookie));
       } else {
-        headers = new HashMap<String, List<String>>(headers);
+        headers = new HashMap<>(headers);
 
         List<String> cookieList = headers.get(COOKIE);
         String       cookies    = cookieList == null || cookieList.isEmpty() ? null : cookieList.get(0);

http://git-wip-us.apache.org/repos/asf/ambari/blob/e8080350/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeGroupResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeGroupResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeGroupResourceProvider.java
index 9b8b018..784dd74 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeGroupResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeGroupResourceProvider.java
@@ -66,11 +66,11 @@ public class UpgradeGroupResourceProvider extends AbstractControllerResourceProv
   protected static final String UPGRADE_GROUP_COMPLETED_TASKS = "UpgradeGroup/completed_task_count";
 
 
-  private static final Set<String> PK_PROPERTY_IDS = new HashSet<String>(
-      Arrays.asList(UPGRADE_REQUEST_ID, UPGRADE_GROUP_ID));
-  private static final Set<String> PROPERTY_IDS = new HashSet<String>();
+  private static final Set<String> PK_PROPERTY_IDS = new HashSet<>(
+    Arrays.asList(UPGRADE_REQUEST_ID, UPGRADE_GROUP_ID));
+  private static final Set<String> PROPERTY_IDS = new HashSet<>();
 
-  private static final Map<Resource.Type, String> KEY_PROPERTY_IDS = new HashMap<Resource.Type, String>();
+  private static final Map<Resource.Type, String> KEY_PROPERTY_IDS = new HashMap<>();
 
   @Inject
   private static UpgradeDAO m_dao = null;
@@ -118,7 +118,7 @@ public class UpgradeGroupResourceProvider extends AbstractControllerResourceProv
       throws SystemException, UnsupportedPropertyException,
       NoSuchResourceException, NoSuchParentResourceException {
 
-    Set<Resource> results = new HashSet<Resource>();
+    Set<Resource> results = new HashSet<>();
     Set<String> requestPropertyIds = getRequestPropertyIds(request, predicate);
 
     for (Map<String, Object> propertyMap : getPropertyMaps(predicate)) {
@@ -141,7 +141,7 @@ public class UpgradeGroupResourceProvider extends AbstractControllerResourceProv
         for (UpgradeGroupEntity group : groups) {
           Resource r = toResource(upgrade, group, requestPropertyIds);
 
-          Set<Long> stageIds = new HashSet<Long>();
+          Set<Long> stageIds = new HashSet<>();
           for (UpgradeItemEntity itemEntity : group.getItems()) {
             stageIds.add(itemEntity.getStageId());
           }

http://git-wip-us.apache.org/repos/asf/ambari/blob/e8080350/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeItemResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeItemResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeItemResourceProvider.java
index ffb3e64..bf0fa33 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeItemResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeItemResourceProvider.java
@@ -71,12 +71,12 @@ public class UpgradeItemResourceProvider extends ReadOnlyResourceProvider {
   public static final String UPGRADE_ITEM_STAGE_ID = "UpgradeItem/stage_id";
   public static final String UPGRADE_ITEM_TEXT = "UpgradeItem/text";
 
-  private static final Set<String> PK_PROPERTY_IDS = new HashSet<String>(
-      Arrays.asList(UPGRADE_REQUEST_ID, UPGRADE_ITEM_STAGE_ID));
-  private static final Set<String> PROPERTY_IDS = new HashSet<String>();
+  private static final Set<String> PK_PROPERTY_IDS = new HashSet<>(
+    Arrays.asList(UPGRADE_REQUEST_ID, UPGRADE_ITEM_STAGE_ID));
+  private static final Set<String> PROPERTY_IDS = new HashSet<>();
 
-  private static final Map<Resource.Type, String> KEY_PROPERTY_IDS = new HashMap<Resource.Type, String>();
-  private static Map<String, String> STAGE_MAPPED_IDS = new HashMap<String, String>();
+  private static final Map<Resource.Type, String> KEY_PROPERTY_IDS = new HashMap<>();
+  private static Map<String, String> STAGE_MAPPED_IDS = new HashMap<>();
 
   @Inject
   private static UpgradeDAO s_dao;
@@ -191,7 +191,7 @@ public class UpgradeItemResourceProvider extends ReadOnlyResourceProvider {
       throws SystemException, UnsupportedPropertyException,
       NoSuchResourceException, NoSuchParentResourceException {
 
-    Set<Resource> results = new LinkedHashSet<Resource>();
+    Set<Resource> results = new LinkedHashSet<>();
     Set<String> requestPropertyIds = getRequestPropertyIds(request, predicate);
 
     for (Map<String, Object> propertyMap : getPropertyMaps(predicate)) {
@@ -215,7 +215,7 @@ public class UpgradeItemResourceProvider extends ReadOnlyResourceProvider {
         stageId = Long.valueOf(stageIdStr);
       }
 
-      List<UpgradeItemEntity> entities = new ArrayList<UpgradeItemEntity>();
+      List<UpgradeItemEntity> entities = new ArrayList<>();
       if (null == stageId) {
         UpgradeGroupEntity group = s_dao.findUpgradeGroup(groupId);
 
@@ -234,7 +234,7 @@ public class UpgradeItemResourceProvider extends ReadOnlyResourceProvider {
 
       // !!! need to do some lookup for stages, so use a stageid -> resource for
       // when that happens
-      Map<Long, Resource> resultMap = new HashMap<Long, Resource>();
+      Map<Long, Resource> resultMap = new HashMap<>();
 
       for (UpgradeItemEntity entity : entities) {
         Resource r = toResource(entity, requestPropertyIds);
@@ -244,7 +244,7 @@ public class UpgradeItemResourceProvider extends ReadOnlyResourceProvider {
       if (!resultMap.isEmpty()) {
         if (null != clusterName) {
           Set<Resource> stages = s_upgradeHelper.getStageResources(clusterName,
-              requestId, new ArrayList<Long>(resultMap.keySet()));
+              requestId, new ArrayList<>(resultMap.keySet()));
 
           for (Resource stage : stages) {
             Long l = (Long) stage.getPropertyValue(StageResourceProvider.STAGE_STAGE_ID);

http://git-wip-us.apache.org/repos/asf/ambari/blob/e8080350/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeSummaryResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeSummaryResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeSummaryResourceProvider.java
index 0a92c91..0c3989d 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeSummaryResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeSummaryResourceProvider.java
@@ -58,12 +58,12 @@ public class UpgradeSummaryResourceProvider extends AbstractControllerResourcePr
 
   protected static final String UPGRADE_SUMMARY_FAIL_REASON = PropertyHelper.getPropertyId("UpgradeSummary", "fail_reason");
 
-  private static final Set<String> PK_PROPERTY_IDS = new HashSet<String>(
-      Arrays.asList(UPGRADE_SUMMARY_REQUEST_ID, UPGRADE_SUMMARY_CLUSTER_NAME));
-  private static final Set<String> PROPERTY_IDS = new HashSet<String>();
-  private static Map<String, String> TASK_MAPPED_IDS = new HashMap<String, String>();
+  private static final Set<String> PK_PROPERTY_IDS = new HashSet<>(
+    Arrays.asList(UPGRADE_SUMMARY_REQUEST_ID, UPGRADE_SUMMARY_CLUSTER_NAME));
+  private static final Set<String> PROPERTY_IDS = new HashSet<>();
+  private static Map<String, String> TASK_MAPPED_IDS = new HashMap<>();
 
-  private static final Map<Resource.Type, String> KEY_PROPERTY_IDS = new HashMap<Resource.Type, String>();
+  private static final Map<Resource.Type, String> KEY_PROPERTY_IDS = new HashMap<>();
 
   @Inject
   private static UpgradeDAO s_upgradeDAO = null;
@@ -115,7 +115,7 @@ public class UpgradeSummaryResourceProvider extends AbstractControllerResourcePr
   @Override
   public Set<Resource> getResources(Request request, Predicate predicate) throws SystemException,
       UnsupportedPropertyException, NoSuchResourceException, NoSuchParentResourceException {
-    Set<Resource> resources = new HashSet<Resource>();
+    Set<Resource> resources = new HashSet<>();
     Set<String> requestPropertyIds = getRequestPropertyIds(request, predicate);
 
     for (Map<String, Object> propertyMap : getPropertyMaps(predicate)) {
@@ -134,7 +134,7 @@ public class UpgradeSummaryResourceProvider extends AbstractControllerResourcePr
             String.format("Cluster %s could not be loaded", clusterName));
       }
 
-      List<UpgradeEntity> upgrades = new ArrayList<UpgradeEntity>();
+      List<UpgradeEntity> upgrades = new ArrayList<>();
       String upgradeRequestIdStr = (String) propertyMap.get(UPGRADE_SUMMARY_REQUEST_ID);
       if (null != upgradeRequestIdStr) {
         UpgradeEntity upgrade = s_upgradeDAO.findUpgradeByRequestId(Long.valueOf(upgradeRequestIdStr));

http://git-wip-us.apache.org/repos/asf/ambari/blob/e8080350/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UserAuthorizationResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UserAuthorizationResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UserAuthorizationResourceProvider.java
index 8193a49..bd81c01 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UserAuthorizationResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UserAuthorizationResourceProvider.java
@@ -75,13 +75,13 @@ public class UserAuthorizationResourceProvider extends ReadOnlyResourceProvider
 
   static {
     Set<String> set;
-    set = new HashSet<String>();
+    set = new HashSet<>();
     set.add(AUTHORIZATION_ID_PROPERTY_ID);
     set.add(USERNAME_PROPERTY_ID);
     set.add(AUTHORIZATION_RESOURCE_TYPE_PROPERTY_ID);
     PK_PROPERTY_IDS = Collections.unmodifiableSet(set);
 
-    set = new HashSet<String>();
+    set = new HashSet<>();
     set.add(AUTHORIZATION_ID_PROPERTY_ID);
     set.add(USERNAME_PROPERTY_ID);
     set.add(AUTHORIZATION_NAME_PROPERTY_ID);
@@ -92,7 +92,7 @@ public class UserAuthorizationResourceProvider extends ReadOnlyResourceProvider
     set.add(AUTHORIZATION_VIEW_INSTANCE_NAME_PROPERTY_ID);
     PROPERTY_IDS = Collections.unmodifiableSet(set);
 
-    HashMap<Type, String> map = new HashMap<Type, String>();
+    HashMap<Type, String> map = new HashMap<>();
     map.put(Type.User, USERNAME_PROPERTY_ID);
     map.put(Type.UserAuthorization, AUTHORIZATION_ID_PROPERTY_ID);
     KEY_PROPERTY_IDS = Collections.unmodifiableMap(map);
@@ -137,7 +137,7 @@ public class UserAuthorizationResourceProvider extends ReadOnlyResourceProvider
       throws SystemException, UnsupportedPropertyException, NoSuchResourceException, NoSuchParentResourceException {
 
     Set<String> requestedIds = getRequestPropertyIds(request, predicate);
-    Set<Resource> resources = new HashSet<Resource>();
+    Set<Resource> resources = new HashSet<>();
 
     // Use the UserPrivilegeProvider to get the set of privileges the user has. This set of privileges
     // is used to generate a composite set of authorizations the user has been granted.
@@ -203,7 +203,7 @@ public class UserAuthorizationResourceProvider extends ReadOnlyResourceProvider
    * @return a predicate
    */
   private Predicate createUserPrivilegePredicate(String username) {
-    return new EqualsPredicate<String>(UserPrivilegeResourceProvider.PRIVILEGE_USER_NAME_PROPERTY_ID, username);
+    return new EqualsPredicate<>(UserPrivilegeResourceProvider.PRIVILEGE_USER_NAME_PROPERTY_ID, username);
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/e8080350/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UserPrivilegeResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UserPrivilegeResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UserPrivilegeResourceProvider.java
index b9b756b..f957f50 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UserPrivilegeResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UserPrivilegeResourceProvider.java
@@ -101,7 +101,7 @@ public class UserPrivilegeResourceProvider extends ReadOnlyResourceProvider {
   /**
    * The property ids for a privilege resource.
    */
-  private static Set<String> propertyIds = new HashSet<String>();
+  private static Set<String> propertyIds = new HashSet<>();
   static {
     propertyIds.add(PRIVILEGE_PRIVILEGE_ID_PROPERTY_ID);
     propertyIds.add(PRIVILEGE_PERMISSION_NAME_PROPERTY_ID);
@@ -143,7 +143,7 @@ public class UserPrivilegeResourceProvider extends ReadOnlyResourceProvider {
   /**
    * The key property ids for a privilege resource.
    */
-  private static Map<Resource.Type, String> keyPropertyIds = new HashMap<Resource.Type, String>();
+  private static Map<Resource.Type, String> keyPropertyIds = new HashMap<>();
   static {
     keyPropertyIds.put(Resource.Type.User, PRIVILEGE_USER_NAME_PROPERTY_ID);
     keyPropertyIds.put(Resource.Type.UserPrivilege, PRIVILEGE_PRIVILEGE_ID_PROPERTY_ID);
@@ -255,7 +255,7 @@ public class UserPrivilegeResourceProvider extends ReadOnlyResourceProvider {
   public Set<Resource> getResources(Request request, Predicate predicate)
       throws SystemException, UnsupportedPropertyException,
       NoSuchResourceException, NoSuchParentResourceException {
-    final Set<Resource> resources = new HashSet<Resource>();
+    final Set<Resource> resources = new HashSet<>();
     final Set<String> requestedIds = getRequestPropertyIds(request, predicate);
 
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/e8080350/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UserResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UserResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UserResourceProvider.java
index 386134d..ee0d5f5 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UserResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UserResourceProvider.java
@@ -60,8 +60,8 @@ public class UserResourceProvider extends AbstractControllerResourceProvider imp
   public static final String USER_ADMIN_PROPERTY_ID        = PropertyHelper.getPropertyId("Users", "admin");
 
   private static Set<String> pkPropertyIds =
-      new HashSet<String>(Arrays.asList(new String[]{
-          USER_USERNAME_PROPERTY_ID}));
+    new HashSet<>(Arrays.asList(new String[]{
+      USER_USERNAME_PROPERTY_ID}));
 
   /**
    * Create a new resource provider for the given management controller.
@@ -81,7 +81,7 @@ public class UserResourceProvider extends AbstractControllerResourceProvider imp
       UnsupportedPropertyException,
       ResourceAlreadyExistsException,
       NoSuchParentResourceException {
-    final Set<UserRequest> requests = new HashSet<UserRequest>();
+    final Set<UserRequest> requests = new HashSet<>();
     for (Map<String, Object> propertyMap : request.getProperties()) {
       requests.add(getRequest(propertyMap));
     }
@@ -101,7 +101,7 @@ public class UserResourceProvider extends AbstractControllerResourceProvider imp
   public Set<Resource> getResources(Request request, Predicate predicate)
       throws SystemException, UnsupportedPropertyException, NoSuchResourceException, NoSuchParentResourceException {
 
-    final Set<UserRequest> requests = new HashSet<UserRequest>();
+    final Set<UserRequest> requests = new HashSet<>();
 
     if (predicate == null) {
       requests.add(getRequest(null));
@@ -125,7 +125,7 @@ public class UserResourceProvider extends AbstractControllerResourceProvider imp
     }
 
     Set<String>   requestedIds = getRequestPropertyIds(request, predicate);
-    Set<Resource> resources    = new HashSet<Resource>();
+    Set<Resource> resources    = new HashSet<>();
 
     for (UserResponse userResponse : responses) {
       ResourceImpl resource = new ResourceImpl(Resource.Type.User);
@@ -157,7 +157,7 @@ public class UserResourceProvider extends AbstractControllerResourceProvider imp
   @Override
   public RequestStatus updateResources(Request request, Predicate predicate)
     throws SystemException, UnsupportedPropertyException, NoSuchResourceException, NoSuchParentResourceException {
-    final Set<UserRequest> requests = new HashSet<UserRequest>();
+    final Set<UserRequest> requests = new HashSet<>();
 
     for (Map<String, Object> propertyMap : getPropertyMaps(request.getProperties().iterator().next(), predicate)) {
       UserRequest req = getRequest(propertyMap);
@@ -179,7 +179,7 @@ public class UserResourceProvider extends AbstractControllerResourceProvider imp
   @Override
   public RequestStatus deleteResourcesAuthorized(Request request, Predicate predicate)
       throws SystemException, UnsupportedPropertyException, NoSuchResourceException, NoSuchParentResourceException {
-    final Set<UserRequest> requests = new HashSet<UserRequest>();
+    final Set<UserRequest> requests = new HashSet<>();
 
     for (Map<String, Object> propertyMap : getPropertyMaps(predicate)) {
       UserRequest req = getRequest(propertyMap);

http://git-wip-us.apache.org/repos/asf/ambari/blob/e8080350/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ValidationResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ValidationResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ValidationResourceProvider.java
index 4dd6e2f..fda22ef 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ValidationResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ValidationResourceProvider.java
@@ -58,8 +58,8 @@ public class ValidationResourceProvider extends StackAdvisorResourceProvider {
   protected static final String ITEMS_CONFIG_TYPE_PROPERTY_ID = "config-type";
   protected static final String ITEMS_CONFIG_NAME_PROPERTY_ID = "config-name";
 
-  private static Set<String> pkPropertyIds = new HashSet<String>(
-      Arrays.asList(new String[] { VALIDATION_ID_PROPERTY_ID }));
+  private static Set<String> pkPropertyIds = new HashSet<>(
+    Arrays.asList(new String[]{VALIDATION_ID_PROPERTY_ID}));
 
   protected ValidationResourceProvider(Set<String> propertyIds, Map<Type, String> keyPropertyIds,
       AmbariManagementController managementController) {
@@ -96,11 +96,11 @@ public class ValidationResourceProvider extends StackAdvisorResourceProvider {
         setResourceProperty(resource, STACK_NAME_PROPERTY_ID, response.getVersion().getStackName(), getPropertyIds());
         setResourceProperty(resource, STACK_VERSION_PROPERTY_ID, response.getVersion().getStackVersion(), getPropertyIds());
 
-        List<Map<String, Object>> listItemProps = new ArrayList<Map<String, Object>>();
+        List<Map<String, Object>> listItemProps = new ArrayList<>();
 
         Set<ValidationItem> items = response.getItems();
         for (ValidationItem item : items) {
-          Map<String, Object> mapItemProps = new HashMap<String, Object>();
+          Map<String, Object> mapItemProps = new HashMap<>();
           mapItemProps.put(ITEMS_TYPE_PROPERTY_ID, item.getType());
           mapItemProps.put(ITEMS_LEVE_PROPERTY_ID, item.getLevel());
           mapItemProps.put(ITEMS_MESSAGE_PROPERTY_ID, item.getMessage());
@@ -124,7 +124,7 @@ public class ValidationResourceProvider extends StackAdvisorResourceProvider {
     });
     notifyCreate(Resource.Type.Validation, request);
 
-    Set<Resource> resources = new HashSet<Resource>(Arrays.asList(validation));
+    Set<Resource> resources = new HashSet<>(Arrays.asList(validation));
     return new RequestStatusImpl(null, resources);
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/e8080350/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 9519055..352aa2d 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
@@ -347,7 +347,7 @@ public class VersionDefinitionResourceProvider extends AbstractAuthorizedResourc
       throws SystemException, UnsupportedPropertyException,
       NoSuchResourceException, NoSuchParentResourceException {
 
-    Set<Resource> results = new HashSet<Resource>();
+    Set<Resource> results = new HashSet<>();
     Set<String> requestPropertyIds = getRequestPropertyIds(request, predicate);
 
     Set<Map<String, Object>> propertyMaps = getPropertyMaps(predicate);

http://git-wip-us.apache.org/repos/asf/ambari/blob/e8080350/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 3f97c9d..db59e74 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
@@ -90,7 +90,7 @@ public class ViewInstanceResourceProvider extends AbstractAuthorizedResourceProv
   /**
    * The key property ids for a view instance resource.
    */
-  private static Map<Resource.Type, String> keyPropertyIds = new HashMap<Resource.Type, String>();
+  private static Map<Resource.Type, String> keyPropertyIds = new HashMap<>();
   static {
     keyPropertyIds.put(Resource.Type.View, VIEW_NAME_PROPERTY_ID);
     keyPropertyIds.put(Resource.Type.ViewVersion, VIEW_VERSION_PROPERTY_ID);
@@ -100,7 +100,7 @@ public class ViewInstanceResourceProvider extends AbstractAuthorizedResourceProv
   /**
    * The property ids for a view instance resource.
    */
-  private static Set<String> propertyIds = new HashSet<String>();
+  private static Set<String> propertyIds = new HashSet<>();
   static {
     propertyIds.add(VIEW_NAME_PROPERTY_ID);
     propertyIds.add(VIEW_VERSION_PROPERTY_ID);
@@ -155,7 +155,7 @@ public class ViewInstanceResourceProvider extends AbstractAuthorizedResourceProv
   public Set<Resource> getResources(Request request, Predicate predicate)
       throws SystemException, UnsupportedPropertyException, NoSuchResourceException, NoSuchParentResourceException {
 
-    Set<Resource> resources    = new HashSet<Resource>();
+    Set<Resource> resources    = new HashSet<>();
     ViewRegistry  viewRegistry = ViewRegistry.getInstance();
     Set<String>   requestedIds = getRequestPropertyIds(request, predicate);
 
@@ -225,7 +225,7 @@ public class ViewInstanceResourceProvider extends AbstractAuthorizedResourceProv
 
   @Override
   protected Set<String> getPKPropertyIds() {
-    return new HashSet<String>(keyPropertyIds.values());
+    return new HashSet<>(keyPropertyIds.values());
   }
 
 
@@ -261,7 +261,7 @@ public class ViewInstanceResourceProvider extends AbstractAuthorizedResourceProv
           viewInstanceEntity.getPropertyMap(), requestedIds);
     }
 
-    Map<String, String> applicationData = new HashMap<String, String>();
+    Map<String, String> applicationData = new HashMap<>();
 
     String currentUserName = viewInstanceEntity.getCurrentUserName();
     for (ViewInstanceDataEntity viewInstanceDataEntity : viewInstanceEntity.getData()) {
@@ -365,7 +365,7 @@ public class ViewInstanceResourceProvider extends AbstractAuthorizedResourceProv
       viewInstanceEntity.setClusterType(ClusterType.valueOf(clusterType));
     }
 
-    Map<String, String> instanceProperties = new HashMap<String, String>();
+    Map<String, String> instanceProperties = new HashMap<>();
 
     boolean isUserAdmin = viewRegistry.checkAdmin();
 
@@ -466,7 +466,7 @@ public class ViewInstanceResourceProvider extends AbstractAuthorizedResourceProv
         Set<String>  requestedIds = getRequestPropertyIds(PropertyHelper.getReadRequest(), predicate);
         ViewRegistry viewRegistry = ViewRegistry.getInstance();
 
-        Set<ViewInstanceEntity> viewInstanceEntities = new HashSet<ViewInstanceEntity>();
+        Set<ViewInstanceEntity> viewInstanceEntities = new HashSet<>();
 
         for (ViewEntity viewEntity : viewRegistry.getDefinitions()){
           // the view must be in the DEPLOYED state to delete an instance

http://git-wip-us.apache.org/repos/asf/ambari/blob/e8080350/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewPermissionResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewPermissionResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewPermissionResourceProvider.java
index 4f0a6f0..638f76d 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewPermissionResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewPermissionResourceProvider.java
@@ -61,7 +61,7 @@ public class ViewPermissionResourceProvider extends AbstractResourceProvider {
   /**
    * The key property ids for a permission resource.
    */
-  private static Map<Resource.Type, String> keyPropertyIds = new HashMap<Resource.Type, String>();
+  private static Map<Resource.Type, String> keyPropertyIds = new HashMap<>();
   static {
     keyPropertyIds.put(Resource.Type.View, VIEW_NAME_PROPERTY_ID);
     keyPropertyIds.put(Resource.Type.ViewVersion, VIEW_VERSION_PROPERTY_ID);
@@ -71,7 +71,7 @@ public class ViewPermissionResourceProvider extends AbstractResourceProvider {
   /**
    * The property ids for a permission resource.
    */
-  private static Set<String> propertyIds = new HashSet<String>();
+  private static Set<String> propertyIds = new HashSet<>();
   static {
     propertyIds.add(VIEW_NAME_PROPERTY_ID);
     propertyIds.add(VIEW_VERSION_PROPERTY_ID);
@@ -116,7 +116,7 @@ public class ViewPermissionResourceProvider extends AbstractResourceProvider {
   public Set<Resource> getResources(Request request, Predicate predicate)
       throws SystemException, UnsupportedPropertyException, NoSuchResourceException, NoSuchParentResourceException {
     ViewRegistry  viewRegistry = ViewRegistry.getInstance();
-    Set<Resource> resources    = new HashSet<Resource>();
+    Set<Resource> resources    = new HashSet<>();
     Set<String>   requestedIds = getRequestPropertyIds(request, predicate);
 
     PermissionEntity viewUsePermission = permissionDAO.findViewUsePermission();
@@ -168,7 +168,7 @@ public class ViewPermissionResourceProvider extends AbstractResourceProvider {
 
   @Override
   protected Set<String> getPKPropertyIds() {
-    return new HashSet<String>(keyPropertyIds.values());
+    return new HashSet<>(keyPropertyIds.values());
   }
 
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/e8080350/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 7182f4c..542965d 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
@@ -53,7 +53,7 @@ public class ViewPrivilegeResourceProvider extends PrivilegeResourceProvider<Vie
   /**
    * The property ids for a privilege resource.
    */
-  private static Set<String> propertyIds = new HashSet<String>();
+  private static Set<String> propertyIds = new HashSet<>();
   static {
     propertyIds.add(PRIVILEGE_VIEW_NAME_PROPERTY_ID);
     propertyIds.add(PRIVILEGE_VIEW_VERSION_PROPERTY_ID);
@@ -68,7 +68,7 @@ public class ViewPrivilegeResourceProvider extends PrivilegeResourceProvider<Vie
   /**
    * The key property ids for a privilege resource.
    */
-  private static Map<Resource.Type, String> keyPropertyIds = new HashMap<Resource.Type, String>();
+  private static Map<Resource.Type, String> keyPropertyIds = new HashMap<>();
   static {
     keyPropertyIds.put(Resource.Type.View, PRIVILEGE_VIEW_NAME_PROPERTY_ID);
     keyPropertyIds.put(Resource.Type.ViewVersion, PRIVILEGE_VIEW_VERSION_PROPERTY_ID);
@@ -132,7 +132,7 @@ public class ViewPrivilegeResourceProvider extends PrivilegeResourceProvider<Vie
           Collections.<Long, ViewInstanceEntity>emptyMap();
     }
 
-    Set<ViewEntity> viewEntities = new HashSet<ViewEntity>();
+    Set<ViewEntity> viewEntities = new HashSet<>();
 
     if (viewVersion != null) {
       ViewEntity viewEntity = viewRegistry.getDefinition(viewName, viewVersion);
@@ -147,7 +147,7 @@ public class ViewPrivilegeResourceProvider extends PrivilegeResourceProvider<Vie
       }
     }
 
-    Map<Long, ViewInstanceEntity> resourceEntities = new HashMap<Long, ViewInstanceEntity>();
+    Map<Long, ViewInstanceEntity> resourceEntities = new HashMap<>();
 
     for (ViewEntity viewEntity : viewEntities) {
       if (viewEntity.isDeployed()) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/e8080350/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 b3bfc4f..23eb087 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
@@ -52,7 +52,7 @@ public class ViewResourceProvider extends AbstractAuthorizedResourceProvider {
   /**
    * The key property ids for a view resource.
    */
-  private static Map<Resource.Type, String> keyPropertyIds = new HashMap<Resource.Type, String>();
+  private static Map<Resource.Type, String> keyPropertyIds = new HashMap<>();
   static {
     keyPropertyIds.put(Resource.Type.View, VIEW_NAME_PROPERTY_ID);
   }
@@ -60,7 +60,7 @@ public class ViewResourceProvider extends AbstractAuthorizedResourceProvider {
   /**
    * The property ids for a view resource.
    */
-  private static Set<String> propertyIds = new HashSet<String>();
+  private static Set<String> propertyIds = new HashSet<>();
   static {
     propertyIds.add(VIEW_NAME_PROPERTY_ID);
   }
@@ -93,7 +93,7 @@ public class ViewResourceProvider extends AbstractAuthorizedResourceProvider {
   @Override
   public Set<Resource> getResources(Request request, Predicate predicate)
       throws SystemException, UnsupportedPropertyException, NoSuchResourceException, NoSuchParentResourceException {
-    Set<Resource> resources    = new HashSet<Resource>();
+    Set<Resource> resources    = new HashSet<>();
     ViewRegistry  viewRegistry = ViewRegistry.getInstance();
     Set<String>   requestedIds = getRequestPropertyIds(request, predicate);
 
@@ -145,6 +145,6 @@ public class ViewResourceProvider extends AbstractAuthorizedResourceProvider {
 
   @Override
   protected Set<String> getPKPropertyIds() {
-    return new HashSet<String>(keyPropertyIds.values());
+    return new HashSet<>(keyPropertyIds.values());
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/e8080350/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewURLResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewURLResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewURLResourceProvider.java
index e436d3c..5e919f2 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewURLResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ViewURLResourceProvider.java
@@ -70,7 +70,7 @@ public class ViewURLResourceProvider extends AbstractAuthorizedResourceProvider
   /**
    * The key property ids for a view URL resource.
    */
-  private static Map<Resource.Type, String> keyPropertyIds = new HashMap<Resource.Type, String>();
+  private static Map<Resource.Type, String> keyPropertyIds = new HashMap<>();
   static {
     keyPropertyIds.put(Resource.Type.ViewURL, URL_NAME_PROPERTY_ID);
   }
@@ -78,7 +78,7 @@ public class ViewURLResourceProvider extends AbstractAuthorizedResourceProvider
   /**
    * The property ids for a view URL resource.
    */
-  private static Set<String> propertyIds = new HashSet<String>();
+  private static Set<String> propertyIds = new HashSet<>();
   static {
     propertyIds.add(URL_NAME_PROPERTY_ID);
     propertyIds.add(URL_SUFFIX_PROPERTY_ID);
@@ -180,7 +180,7 @@ public class ViewURLResourceProvider extends AbstractAuthorizedResourceProvider
 
   @Override
   protected Set<String> getPKPropertyIds() {
-    return new HashSet<String>(keyPropertyIds.values());
+    return new HashSet<>(keyPropertyIds.values());
   }
 
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/e8080350/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 4055f1a..a7f6b48 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
@@ -62,7 +62,7 @@ public class ViewVersionResourceProvider extends AbstractResourceProvider {
   /**
    * The key property ids for a view resource.
    */
-  private static Map<Resource.Type, String> keyPropertyIds = new HashMap<Resource.Type, String>();
+  private static Map<Resource.Type, String> keyPropertyIds = new HashMap<>();
   static {
     keyPropertyIds.put(Resource.Type.View, VIEW_NAME_PROPERTY_ID);
     keyPropertyIds.put(Resource.Type.ViewVersion, VIEW_VERSION_PROPERTY_ID);
@@ -71,7 +71,7 @@ public class ViewVersionResourceProvider extends AbstractResourceProvider {
   /**
    * The property ids for a view resource.
    */
-  private static Set<String> propertyIds = new HashSet<String>();
+  private static Set<String> propertyIds = new HashSet<>();
   static {
     propertyIds.add(VIEW_NAME_PROPERTY_ID);
     propertyIds.add(VIEW_VERSION_PROPERTY_ID);
@@ -112,7 +112,7 @@ public class ViewVersionResourceProvider extends AbstractResourceProvider {
   @Override
   public Set<Resource> getResources(Request request, Predicate predicate)
       throws SystemException, UnsupportedPropertyException, NoSuchResourceException, NoSuchParentResourceException {
-    Set<Resource> resources    = new HashSet<Resource>();
+    Set<Resource> resources    = new HashSet<>();
     ViewRegistry  viewRegistry = ViewRegistry.getInstance();
     Set<String>   requestedIds = getRequestPropertyIds(request, predicate);
 
@@ -180,6 +180,6 @@ public class ViewVersionResourceProvider extends AbstractResourceProvider {
 
   @Override
   protected Set<String> getPKPropertyIds() {
-    return new HashSet<String>(keyPropertyIds.values());
+    return new HashSet<>(keyPropertyIds.values());
   }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/e8080350/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 1e8715e..a40f165 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
@@ -129,7 +129,7 @@ public class WidgetLayoutResourceProvider extends AbstractControllerResourceProv
       ResourceAlreadyExistsException,
       NoSuchParentResourceException {
 
-    Set<Resource> associatedResources = new HashSet<Resource>();
+    Set<Resource> associatedResources = new HashSet<>();
 
     for (final Map<String, Object> properties : request.getProperties()) {
       WidgetLayoutEntity widgetLayoutEntity = createResources(new Command<WidgetLayoutEntity>() {
@@ -163,7 +163,7 @@ public class WidgetLayoutResourceProvider extends AbstractControllerResourceProv
           entity.setUserName(userName);
           entity.setDisplayName(properties.get(WIDGETLAYOUT_DISPLAY_NAME_PROPERTY_ID).toString());
 
-          List<WidgetLayoutUserWidgetEntity> widgetLayoutUserWidgetEntityList = new LinkedList<WidgetLayoutUserWidgetEntity>();
+          List<WidgetLayoutUserWidgetEntity> widgetLayoutUserWidgetEntityList = new LinkedList<>();
           int order=0;
           for (Object widgetObject : widgetsSet) {
             HashMap<String, Object> widget = (HashMap) widgetObject;
@@ -200,12 +200,12 @@ public class WidgetLayoutResourceProvider extends AbstractControllerResourceProv
   @Override
   public Set<Resource> getResources(Request request, Predicate predicate)
       throws SystemException, UnsupportedPropertyException, NoSuchResourceException, NoSuchParentResourceException {
-    final Set<Resource> resources = new HashSet<Resource>();
+    final Set<Resource> resources = new HashSet<>();
     final Set<String> requestedIds = getRequestPropertyIds(request, predicate);
     final Set<Map<String, Object>> propertyMaps = getPropertyMaps(predicate);
 
-    List<WidgetEntity> widgetEntities = new ArrayList<WidgetEntity>();
-    List<WidgetLayoutEntity> layoutEntities = new ArrayList<WidgetLayoutEntity>();
+    List<WidgetEntity> widgetEntities = new ArrayList<>();
+    List<WidgetLayoutEntity> layoutEntities = new ArrayList<>();
 
     for (Map<String, Object> propertyMap: propertyMaps) {
       String userName = getUserName(propertyMap);
@@ -242,11 +242,11 @@ public class WidgetLayoutResourceProvider extends AbstractControllerResourceProv
       resource.setProperty(WIDGETLAYOUT_USERNAME_PROPERTY_ID, layoutEntity.getUserName());
       resource.setProperty(WIDGETLAYOUT_DISPLAY_NAME_PROPERTY_ID, layoutEntity.getDisplayName());
 
-      List<HashMap> widgets = new ArrayList<HashMap>();
+      List<HashMap> widgets = new ArrayList<>();
       List<WidgetLayoutUserWidgetEntity> widgetLayoutUserWidgetEntityList = layoutEntity.getListWidgetLayoutUserWidgetEntity();
       for (WidgetLayoutUserWidgetEntity widgetLayoutUserWidgetEntity : widgetLayoutUserWidgetEntityList) {
         WidgetEntity widgetEntity = widgetLayoutUserWidgetEntity.getWidget();
-        HashMap<String, Object> widgetInfoMap = new HashMap<String, Object>();
+        HashMap<String, Object> widgetInfoMap = new HashMap<>();
         widgetInfoMap.put("WidgetInfo",WidgetResponse.coerce(widgetEntity));
         widgets.add(widgetInfoMap);
       }
@@ -301,7 +301,7 @@ public class WidgetLayoutResourceProvider extends AbstractControllerResourceProv
             }
             entity.setListWidgetLayoutUserWidgetEntity(new LinkedList<WidgetLayoutUserWidgetEntity>());
 
-            List<WidgetLayoutUserWidgetEntity> widgetLayoutUserWidgetEntityList = new LinkedList<WidgetLayoutUserWidgetEntity>();
+            List<WidgetLayoutUserWidgetEntity> widgetLayoutUserWidgetEntityList = new LinkedList<>();
             int order = 0;
             for (Object widgetObject : widgetsSet) {
               HashMap<String, Object> widget = (HashMap) widgetObject;
@@ -338,7 +338,7 @@ public class WidgetLayoutResourceProvider extends AbstractControllerResourceProv
       throws SystemException, UnsupportedPropertyException, NoSuchResourceException, NoSuchParentResourceException {
     final Set<Map<String, Object>> propertyMaps = getPropertyMaps(predicate);
 
-    final List<WidgetLayoutEntity> entitiesToBeRemoved = new ArrayList<WidgetLayoutEntity>();
+    final List<WidgetLayoutEntity> entitiesToBeRemoved = new ArrayList<>();
     for (Map<String, Object> propertyMap : propertyMaps) {
       final Long id;
       try {

http://git-wip-us.apache.org/repos/asf/ambari/blob/e8080350/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/WidgetResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/WidgetResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/WidgetResourceProvider.java
index 7c85b8f..a3d3ab5 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/WidgetResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/WidgetResourceProvider.java
@@ -133,7 +133,7 @@ public class WidgetResourceProvider extends AbstractControllerResourceProvider {
       ResourceAlreadyExistsException,
       NoSuchParentResourceException {
 
-    Set<Resource> associatedResources = new HashSet<Resource>();
+    Set<Resource> associatedResources = new HashSet<>();
 
     for (final Map<String, Object> properties : request.getProperties()) {
       WidgetEntity widgetEntity = createResources(new Command<WidgetEntity>() {
@@ -178,7 +178,7 @@ public class WidgetResourceProvider extends AbstractControllerResourceProvider {
                   gson.toJson(properties.get(WIDGET_VALUES_PROPERTY_ID)) : null;
           entity.setWidgetValues(values);
 
-          Map<String, Object> widgetPropertiesMap = new HashMap<String, Object>();
+          Map<String, Object> widgetPropertiesMap = new HashMap<>();
           for (Map.Entry<String, Object> entry : properties.entrySet()) {
             if (PropertyHelper.getPropertyCategory(entry.getKey()).equals(WIDGET_PROPERTIES_PROPERTY_ID)) {
               widgetPropertiesMap.put(PropertyHelper.getPropertyName(entry.getKey()), entry.getValue());
@@ -206,12 +206,12 @@ public class WidgetResourceProvider extends AbstractControllerResourceProvider {
   @Override
   public Set<Resource> getResources(Request request, Predicate predicate)
       throws SystemException, UnsupportedPropertyException, NoSuchResourceException, NoSuchParentResourceException {
-    final Set<Resource> resources = new HashSet<Resource>();
+    final Set<Resource> resources = new HashSet<>();
     final Set<String> requestedIds = getRequestPropertyIds(request, predicate);
     final Set<Map<String, Object>> propertyMaps = getPropertyMaps(predicate);
     String author = AuthorizationHelper.getAuthenticatedName();
 
-    List<WidgetEntity> requestedEntities = new ArrayList<WidgetEntity>();
+    List<WidgetEntity> requestedEntities = new ArrayList<>();
 
     for (Map<String, Object> propertyMap: propertyMaps) {
       if (propertyMap.get(WIDGET_ID_PROPERTY_ID) != null) {
@@ -313,7 +313,7 @@ public class WidgetResourceProvider extends AbstractControllerResourceProvider {
             entity.setWidgetValues(gson.toJson(propertyMap.get(WIDGET_VALUES_PROPERTY_ID)));
           }
 
-          Map<String, Object> widgetPropertiesMap = new HashMap<String, Object>();
+          Map<String, Object> widgetPropertiesMap = new HashMap<>();
           for (Map.Entry<String, Object> entry : propertyMap.entrySet()) {
             if (PropertyHelper.getPropertyCategory(entry.getKey()).equals(WIDGET_PROPERTIES_PROPERTY_ID)) {
               widgetPropertiesMap.put(PropertyHelper.getPropertyName(entry.getKey()), entry.getValue());
@@ -338,7 +338,7 @@ public class WidgetResourceProvider extends AbstractControllerResourceProvider {
       throws SystemException, UnsupportedPropertyException, NoSuchResourceException, NoSuchParentResourceException {
     final Set<Map<String, Object>> propertyMaps = getPropertyMaps(predicate);
 
-    final List<WidgetEntity> entitiesToBeRemoved = new ArrayList<WidgetEntity>();
+    final List<WidgetEntity> entitiesToBeRemoved = new ArrayList<>();
     for (Map<String, Object> propertyMap : propertyMaps) {
       final Long id;
       try {


Mime
View raw message