ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ababiic...@apache.org
Subject [14/32] ambari git commit: AMBARI-21723. Redundant type arguments (Java 8)
Date Thu, 17 Aug 2017 10:16:20 GMT
AMBARI-21723. Redundant type arguments (Java 8)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/ab8d58ba
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/ab8d58ba
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/ab8d58ba

Branch: refs/heads/branch-feature-logsearch-ui
Commit: ab8d58ba4464791b95b56be75fd44ce9c20349c6
Parents: 7879336
Author: Attila Doroszlai <adoroszlai@hortonworks.com>
Authored: Tue Aug 15 11:30:50 2017 +0200
Committer: Attila Doroszlai <adoroszlai@hortonworks.com>
Committed: Wed Aug 16 10:42:11 2017 +0200

----------------------------------------------------------------------
 .../persist/jpa/AmbariJpaPersistModule.java     |   2 +-
 .../server/actionmanager/ActionManager.java     |   2 +-
 .../actionmanager/ExecutionCommandWrapper.java  |   7 +-
 .../ambari/server/actionmanager/Stage.java      |  13 +-
 .../apache/ambari/server/agent/ActionQueue.java |   2 +-
 .../ambari/server/agent/AgentRequests.java      |   2 +-
 .../ambari/server/agent/HeartBeatHandler.java   |   2 +-
 .../server/alerts/StaleAlertRunnable.java       |   2 +-
 .../ambari/server/api/predicate/QueryLexer.java |   2 +-
 .../expressions/LogicalExpression.java          |   2 +-
 .../ambari/server/api/query/QueryImpl.java      |   4 +-
 .../query/render/ClusterBlueprintRenderer.java  |  16 +-
 .../RequestScheduleResourceDefinition.java      |   2 +-
 .../resources/ResourceInstanceFactoryImpl.java  |   2 +-
 .../api/resources/SubResourceDefinition.java    |   2 +-
 .../ViewInstanceResourceDefinition.java         |   2 +-
 .../server/api/services/AmbariMetaInfo.java     |   5 +-
 .../server/api/services/ViewUrlsService.java    |   2 +-
 .../services/parsers/JsonRequestBodyParser.java |   3 +-
 .../persistence/PersistenceManagerImpl.java     |   2 +-
 .../services/serializers/JsonSerializer.java    |   5 +-
 .../stackadvisor/StackAdvisorRunner.java        |   2 +-
 .../ambari/server/audit/AsyncAuditLogger.java   |   2 +-
 .../eventcreator/PrivilegeEventCreator.java     |   2 +-
 .../RepositoryVersionEventCreator.java          |   2 +-
 .../eventcreator/ViewPrivilegeEventCreator.java |   2 +-
 .../ambari/server/bootstrap/BootStrapImpl.java  |   2 +-
 .../server/checks/AbstractCheckDescriptor.java  |   2 +-
 .../checks/DatabaseConsistencyCheckHelper.java  |   2 +-
 .../checks/SecondaryNamenodeDeletedCheck.java   |   2 +-
 .../ServicesMapReduceDistributedCacheCheck.java |   2 +-
 .../checks/ServicesNamenodeTruncateCheck.java   |   2 +-
 .../ServicesTezDistributedCacheCheck.java       |   2 +-
 .../YarnTimelineServerStatePreservingCheck.java |   2 +-
 .../collections/functors/ContainsPredicate.java |   2 +-
 .../DelegatedMultiplePredicateContainer.java    |   2 +-
 .../DelegatedSinglePredicateContainer.java      |   2 +-
 .../collections/functors/EqualsPredicate.java   |   2 +-
 .../controller/AmbariActionExecutionHelper.java |   4 +-
 .../AmbariManagementControllerImpl.java         |  31 +-
 .../server/controller/ConfigGroupResponse.java  |   2 +-
 .../server/controller/ControllerModule.java     |   3 +-
 .../ambari/server/controller/HostResponse.java  |   8 +-
 .../server/controller/KerberosHelperImpl.java   |  14 +-
 .../server/controller/LdapSyncRequest.java      |   2 +-
 .../AbstractAuthorizedResourceProvider.java     |   2 +-
 .../internal/AbstractProviderModule.java        |   8 +-
 .../internal/BlueprintResourceProvider.java     |   4 +-
 .../internal/ClusterControllerImpl.java         |   6 +-
 .../internal/ClusterResourceProvider.java       |   2 +-
 .../ClusterStackVersionResourceProvider.java    |   4 +-
 .../internal/ComponentResourceProvider.java     |  14 +-
 .../internal/ConfigGroupResourceProvider.java   |   8 +-
 .../internal/ConfigurationResourceProvider.java |   2 +-
 .../internal/ExportBlueprintRequest.java        |   4 +-
 .../server/controller/internal/Extension.java   |   2 +-
 .../internal/ExtensionLinkResourceProvider.java |   4 +-
 .../internal/ExtensionResourceProvider.java     |   2 +-
 .../ExtensionVersionResourceProvider.java       |   2 +-
 .../internal/HostComponentResourceProvider.java |   8 +-
 .../internal/HostResourceProvider.java          |   2 +-
 .../HostStackVersionResourceProvider.java       |   2 +-
 .../KerberosDescriptorResourceProvider.java     |   2 +-
 .../OperatingSystemResourceProvider.java        |   2 +-
 .../internal/PrivilegeResourceProvider.java     |   2 +-
 .../internal/RemoteClusterResourceProvider.java |   2 +-
 .../internal/RepositoryResourceProvider.java    |   2 +-
 .../RepositoryVersionResourceProvider.java      |   2 +-
 .../server/controller/internal/RequestImpl.java |   6 +-
 .../internal/RequestResourceProvider.java       |   2 +-
 .../internal/RequestStageContainer.java         |   2 +-
 .../controller/internal/RequestStatusImpl.java  |   2 +-
 .../controller/internal/ResourceImpl.java       |   2 +-
 .../RootServiceComponentResourceProvider.java   |   2 +-
 ...ootServiceHostComponentResourceProvider.java |   2 +-
 .../internal/RootServiceResourceProvider.java   |   2 +-
 .../internal/ScaleClusterRequest.java           |   8 +-
 .../internal/ServiceResourceProvider.java       |  14 +-
 .../server/controller/internal/Stack.java       |  10 +-
 .../internal/StackAdvisorResourceProvider.java  |   4 +-
 ...ConfigurationDependencyResourceProvider.java |   2 +-
 .../StackConfigurationResourceProvider.java     |   2 +-
 ...StackLevelConfigurationResourceProvider.java |   2 +-
 .../internal/StackResourceProvider.java         |   2 +-
 .../StackServiceComponentResourceProvider.java  |   2 +-
 .../internal/StackServiceResourceProvider.java  |   2 +-
 .../internal/StackVersionResourceProvider.java  |   2 +-
 .../internal/UpgradeResourceProvider.java       |   4 +-
 .../VersionDefinitionResourceProvider.java      |   2 +-
 .../internal/ViewInstanceResourceProvider.java  |   2 +-
 .../internal/ViewPrivilegeResourceProvider.java |   2 +-
 .../internal/ViewResourceProvider.java          |   2 +-
 .../internal/ViewVersionResourceProvider.java   |   2 +-
 .../internal/WidgetLayoutResourceProvider.java  |   2 +-
 .../GangliaComponentPropertyProvider.java       |   2 +-
 .../GangliaHostComponentPropertyProvider.java   |   2 +-
 .../metrics/timeline/AMSPropertyProvider.java   |   2 +-
 .../metrics/timeline/MetricsRequestHelper.java  |   4 +-
 .../cache/TimelineMetricCacheEntryFactory.java  |   2 +-
 .../controller/utilities/PropertyHelper.java    |   2 +-
 .../utilities/ScalingThreadPoolExecutor.java    |   2 +-
 .../upgrade/HostVersionOutOfSyncListener.java   |   2 +-
 .../users/PostUserCreationHookContext.java      |   2 +-
 .../ambari/server/logging/LockFactory.java      |   2 +-
 .../server/metadata/RoleCommandOrder.java       |   2 +-
 .../dispatchers/AlertScriptDispatcher.java      |   2 +-
 .../server/orm/dao/HostConfigMappingDAO.java    |   2 +-
 .../server/orm/dao/HostRoleCommandDAO.java      |   2 +-
 .../server/orm/entities/ArtifactEntity.java     |   2 +-
 .../AmbariDelegatingAuthenticationFilter.java   |   2 +-
 .../authorization/PermissionHelper.java         |   2 +-
 .../server/security/authorization/Users.java    |   2 +-
 .../serveraction/AbstractServerAction.java      |   2 +-
 .../kerberos/KerberosOperationHandler.java      |   6 +-
 .../upgrades/AutoSkipFailedSummaryAction.java   |   2 +-
 .../ambari/server/stack/ServiceModule.java      |   9 +-
 .../ambari/server/stack/StackManager.java       |   8 +-
 .../apache/ambari/server/stack/StackModule.java |   6 +-
 .../ambari/server/stageplanner/RoleGraph.java   |   2 +-
 .../ambari/server/state/ConfigHelper.java       |  16 +-
 .../apache/ambari/server/state/ConfigImpl.java  |   2 +-
 .../ambari/server/state/ConfigMergeHelper.java  |   6 +-
 .../apache/ambari/server/state/ServiceInfo.java |   6 +-
 .../apache/ambari/server/state/StackInfo.java   |  12 +-
 .../state/alert/AggregateDefinitionMapping.java |   2 +-
 .../server/state/cluster/ClusterImpl.java       |  35 +-
 .../server/state/cluster/ClustersImpl.java      |  14 +-
 .../state/configgroup/ConfigGroupImpl.java      |  10 +-
 .../ambari/server/state/host/HostImpl.java      |   2 +-
 .../kerberos/AbstractKerberosDescriptor.java    |   6 +-
 .../kerberos/KerberosServiceDescriptor.java     |   2 +-
 .../DefaultQuickLinkVisibilityController.java   |   6 +-
 .../state/repository/VersionDefinitionXml.java  |   4 +-
 .../services/AlertNoticeDispatchService.java    |   2 +-
 .../server/state/stack/ConfigUpgradePack.java   |   2 +-
 .../ambari/server/state/stack/OsFamily.java     |   2 +-
 .../state/stack/upgrade/ClusterGrouping.java    |   2 +-
 .../state/stack/upgrade/ColocatedGrouping.java  |   6 +-
 .../server/state/stack/upgrade/Grouping.java    |   2 +-
 .../state/stack/upgrade/HostOrderGrouping.java  |   4 +-
 .../stack/upgrade/RepositoryVersionHelper.java  |   2 +-
 .../stack/upgrade/ServiceCheckGrouping.java     |   2 +-
 .../state/stack/upgrade/StageWrapper.java       |   2 +-
 .../stack/upgrade/StageWrapperBuilder.java      |   2 +-
 .../server/state/stack/upgrade/TaskWrapper.java |   2 +-
 .../ambari/server/topology/BlueprintImpl.java   |   2 +-
 .../topology/ClusterConfigurationRequest.java   |   6 +-
 .../ambari/server/topology/Configuration.java   |   4 +-
 .../ambari/server/topology/HostGroupImpl.java   |   2 +-
 .../ambari/server/topology/HostRequest.java     |   8 +-
 .../ambari/server/topology/LogicalRequest.java  |   2 +-
 .../server/topology/PersistedStateImpl.java     |   2 +-
 .../ambari/server/topology/TopologyManager.java |  10 +-
 .../RequiredConfigPropertiesValidator.java      |   2 +-
 .../server/upgrade/AbstractUpgradeCatalog.java  |  10 +-
 .../apache/ambari/server/utils/StageUtils.java  |   2 +-
 .../ambari/server/view/ViewContextImpl.java     |   4 +-
 .../view/ViewDataMigrationContextImpl.java      |   2 +-
 .../server/view/ViewURLStreamProvider.java      |   4 +-
 .../view/configuration/InstanceConfig.java      |   2 +-
 .../view/configuration/PersistenceConfig.java   |   2 +-
 .../view/configuration/ResourceConfig.java      |   2 +-
 .../server/view/configuration/ViewConfig.java   |   8 +-
 .../ambari/server/view/events/EventImpl.java    |   2 +-
 .../server/view/persistence/DataStoreImpl.java  |   2 +-
 .../TransactionalLockInterceptorTest.java       |   3 +-
 .../ExecutionCommandWrapperTest.java            |   8 +-
 .../ambari/server/actionmanager/StageTest.java  |   2 +-
 .../server/agent/HeartbeatProcessorTest.java    |  19 +-
 .../server/agent/HeartbeatTestHelper.java       |   2 +-
 .../server/agent/TestHeartbeatHandler.java      |  22 +-
 .../server/agent/TestHeartbeatMonitor.java      |   6 +-
 .../alerts/AmbariPerformanceRunnableTest.java   |   3 +-
 .../ComponentVersionAlertRunnableTest.java      |   4 +-
 .../server/api/handlers/ReadHandlerTest.java    |  12 +-
 .../server/api/predicate/QueryParserTest.java   |   2 +-
 .../ambari/server/api/query/QueryImplTest.java  |  24 +-
 .../ambari/server/api/query/QueryInfoTest.java  |   2 +-
 .../render/ClusterBlueprintRendererTest.java    |  21 +-
 .../api/query/render/DefaultRendererTest.java   |   8 +-
 .../api/query/render/MinimalRendererTest.java   |  14 +-
 .../resources/BaseResourceDefinitionTest.java   |   2 +-
 .../resources/SimpleResourceDefinitionTest.java |   8 +-
 .../server/api/services/ClusterServiceTest.java |   6 +-
 .../api/services/DeleteResultMetaDataTest.java  |   2 +-
 .../services/KerberosServiceMetaInfoTest.java   |   2 +-
 .../api/services/NamedPropertySetTest.java      |   2 +-
 .../api/services/RepositoryServiceTest.java     |   2 +-
 .../server/api/services/RequestBodyTest.java    |   2 +-
 .../server/api/services/RequestFactoryTest.java |  12 +-
 .../audit/request/DefaultEventCreatorTest.java  |   9 +-
 .../audit/request/RequestAuditLoggerTest.java   |   3 +-
 .../creator/AuditEventCreatorTestBase.java      |   2 +-
 .../ConfigurationChangeEventCreatorTest.java    |   2 +-
 .../server/bootstrap/BootStrapResourceTest.java |   2 +-
 .../checks/ConfigurationMergeCheckTest.java     |   2 +-
 .../DatabaseConsistencyCheckHelperTest.java     |   6 +-
 .../ambari/server/checks/HealthCheckTest.java   |   2 +-
 .../checks/HostsMasterMaintenanceCheckTest.java |  10 +-
 .../SecondaryNamenodeDeletedCheckTest.java      |   5 +-
 .../checks/ServiceCheckValidityCheckTest.java   |   2 +-
 .../server/collections/PredicateUtilsTest.java  |   6 +-
 .../collections/functors/AndPredicateTest.java  |   8 +-
 .../collections/functors/NotPredicateTest.java  |   4 +-
 .../collections/functors/OrPredicateTest.java   |   8 +-
 .../AmbariCustomCommandExecutionHelperTest.java |  16 +-
 .../AmbariManagementControllerImplTest.java     |  56 +--
 .../AmbariManagementControllerTest.java         | 161 ++++---
 .../controller/AuthToLocalBuilderTest.java      |  42 +-
 .../BackgroundCustomCommandExecutionTest.java   |   2 +-
 .../server/controller/KerberosHelperTest.java   | 181 ++++----
 ...hYarnCapacitySchedulerReleaseConfigTest.java |   4 +-
 .../RootServiceResponseFactoryTest.java         |   2 +-
 .../ActiveWidgetLayoutResourceProviderTest.java |   3 +-
 .../AlertDefinitionResourceProviderTest.java    |   8 +-
 .../AlertGroupResourceProviderTest.java         |   2 +-
 .../AlertHistoryResourceProviderTest.java       |   2 +-
 .../AlertNoticeResourceProviderTest.java        |   2 +-
 .../AmbariPrivilegeResourceProviderTest.java    |   8 +-
 .../internal/ArtifactResourceProviderTest.java  |  12 +-
 .../internal/BaseBlueprintProcessorTest.java    |  13 +-
 .../BlueprintConfigurationProcessorTest.java    | 416 +++++++++----------
 .../internal/BlueprintResourceProviderTest.java |  15 +-
 .../internal/CalculatedStatusTest.java          |   8 +-
 .../ClientConfigResourceProviderTest.java       |   9 +-
 .../internal/ClusterControllerImplTest.java     |  12 +-
 ...rKerberosDescriptorResourceProviderTest.java |   2 +-
 .../internal/ClusterResourceProviderTest.java   |  14 +-
 ...ClusterStackVersionResourceProviderTest.java |  70 ++--
 .../internal/ComponentResourceProviderTest.java |   4 +-
 .../ConfigGroupResourceProviderTest.java        |   6 +-
 .../ConfigurationResourceProviderTest.java      |   2 +-
 .../internal/ExportBlueprintRequestTest.java    |   6 +-
 .../internal/ExtensionResourceProviderTest.java |   3 +-
 .../internal/FeedResourceProviderTest.java      |   6 +-
 ...ostComponentProcessResourceProviderTest.java |   6 +-
 .../HostComponentResourceProviderTest.java      |  23 +-
 .../internal/HostResourceProviderTest.java      | 111 +++--
 .../HostStackVersionResourceProviderTest.java   |  24 +-
 .../internal/HttpPropertyProviderTest.java      |  18 +-
 .../internal/InstanceResourceProviderTest.java  |   6 +-
 .../internal/JMXHostProviderTest.java           |   4 +-
 .../KerberosDescriptorResourceProviderTest.java |   7 +-
 .../internal/MemberResourceProviderTest.java    |  11 +-
 .../PreUpgradeCheckResourceProviderTest.java    |   2 +-
 .../internal/ProvisionClusterRequestTest.java   |   6 +-
 .../QuickLinkArtifactResourceProviderTest.java  |   6 +-
 .../RepositoryResourceProviderTest.java         |   5 +-
 .../controller/internal/RequestImplTest.java    |   7 +-
 .../internal/RequestResourceProviderTest.java   |  26 +-
 .../internal/RequestStageContainerTest.java     |   3 +-
 ...ootServiceComponentPropertyProviderTest.java |   3 +-
 ...ootServiceComponentResourceProviderTest.java |   5 +-
 ...erviceHostComponentResourceProviderTest.java |   2 +-
 .../RootServiceResourceProviderTest.java        |   5 +-
 .../internal/ScaleClusterRequestTest.java       |   6 +-
 .../internal/ServiceResourceProviderTest.java   |  42 +-
 .../SimplifyingPredicateVisitorTest.java        |   6 +-
 .../StackAdvisorResourceProviderTest.java       |   4 +-
 .../StackDefinedPropertyProviderTest.java       |  18 +-
 .../internal/StackResourceProviderTest.java     |   3 +-
 .../StackServiceResourceProviderTest.java       |   5 +-
 .../server/controller/internal/StackTest.java   |  62 ++-
 .../StackUpgradeConfigurationMergeTest.java     |   3 +-
 .../internal/StageResourceProviderTest.java     |   4 +-
 .../TargetClusterResourceProviderTest.java      |   6 +-
 .../internal/UpgradeResourceProviderTest.java   |   4 +-
 .../UpgradeSummaryResourceProviderTest.java     |   6 +-
 .../UserAuthorizationResourceProviderTest.java  |   2 +-
 .../UserPrivilegeResourceProviderTest.java      |  13 +-
 .../internal/UserResourceProviderTest.java      |   2 +-
 .../ViewInstanceResourceProviderTest.java       |   3 +-
 .../internal/ViewURLResourceProviderTest.java   |   2 +-
 .../WidgetLayoutResourceProviderTest.java       |   6 +-
 .../LogSearchDataRetrievalServiceTest.java      |   2 +-
 .../LoggingRequestHelperFactoryImplTest.java    |   2 +-
 .../logging/LoggingRequestHelperImplTest.java   |   6 +-
 .../metrics/JMXPropertyProviderTest.java        |  12 +-
 .../RestMetricsPropertyProviderTest.java        |  12 +-
 .../ganglia/GangliaPropertyProviderTest.java    |   2 +-
 .../timeline/MetricsRequestHelperTest.java      |   6 +-
 .../listeners/tasks/TaskStatusListenerTest.java |   3 +-
 .../server/hooks/users/UserHookServiceTest.java |   4 +-
 .../apache/ambari/server/orm/OrmTestHelper.java |   2 +-
 .../server/orm/dao/HostRoleCommandDAOTest.java  |  10 +-
 .../ambari/server/orm/dao/RequestDAOTest.java   |   6 +-
 .../ambari/server/orm/dao/StageDAOTest.java     |   2 +-
 .../ambari/server/orm/dao/UpgradeDAOTest.java   |   7 +-
 .../ambari/server/orm/dao/WidgetDAOTest.java    |   2 +-
 .../apache/ambari/server/orm/db/DDLTests.java   |   2 +-
 .../server/orm/entities/HostEntityTest.java     |  12 +-
 .../orm/entities/LdapSyncEventEntityTest.java   |   2 +-
 .../orm/entities/LdapSyncSpecEntityTest.java    |  10 +-
 .../scheduler/ExecutionScheduleManagerTest.java |   6 +-
 .../authorization/AmbariAuthenticationTest.java |  11 +-
 .../AmbariAuthorizationFilterTest.java          |  10 +-
 .../AmbariUserAuthenticationFilterTest.java     |   2 +-
 .../security/authorization/UsersTest.java       |   4 +-
 .../ldap/AmbariLdapDataPopulatorTest.java       |  83 ++--
 .../serveraction/ServerActionExecutorTest.java  |   2 +-
 .../ADKerberosOperationHandlerTest.java         |   2 +-
 .../FinalizeKerberosServerActionTest.java       |   2 +-
 .../kerberos/KerberosOperationHandlerTest.java  |   2 +-
 .../MITKerberosOperationHandlerTest.java        |  20 +-
 .../UpdateKerberosConfigsServerActionTest.java  |   2 +-
 .../upgrades/ConfigureActionTest.java           |   6 +-
 .../upgrades/HiveZKQuorumConfigActionTest.java  |   2 +-
 .../RangerKerberosConfigCalculationTest.java    |   2 +-
 .../PostUserCreationHookServerActionTest.java   |   4 +-
 .../server/stack/ComponentModuleTest.java       |   2 +-
 .../ambari/server/stack/ServiceModuleTest.java  |  24 +-
 .../ambari/server/stack/StackModuleTest.java    |  10 +-
 .../ambari/server/state/CheckHelperTest.java    |   4 +-
 .../ambari/server/state/ConfigHelperTest.java   |   8 +-
 .../ambari/server/state/UpgradeHelperTest.java  |  16 +-
 .../state/alerts/AlertDefinitionHashTest.java   |   7 +-
 .../state/alerts/AlertReceivedListenerTest.java |   3 +-
 .../alerts/AlertStateChangedEventTest.java      |   4 +-
 .../state/cluster/ClusterDeadlockTest.java      |   6 +-
 .../server/state/cluster/ClusterTest.java       |  57 ++-
 .../server/state/cluster/ClustersTest.java      |  15 +-
 ...omponentHostConcurrentWriteDeadlockTest.java |   6 +-
 .../ambari/server/state/host/HostTest.java      |   4 +-
 .../KerberosDescriptorUpdateHelperTest.java     |   3 +-
 .../quicklinksprofile/FilterEvaluatorTest.java  |   8 +-
 .../QuickLinkVisibilityControllerTest.java      |  40 +-
 .../AlertNoticeDispatchServiceTest.java         |   2 +-
 .../services/RetryUpgradeActionServiceTest.java |   2 +-
 .../svccomphost/ServiceComponentHostTest.java   |  30 +-
 .../server/topology/AmbariContextTest.java      |  14 +-
 .../server/topology/BlueprintFactoryTest.java   |   2 +-
 .../topology/BlueprintValidatorImplTest.java    |  20 +-
 .../ClusterConfigurationRequestTest.java        |  74 ++--
 .../ClusterDeployWithStartOnlyTest.java         |  43 +-
 ...InstallWithoutStartOnComponentLevelTest.java |  45 +-
 .../ClusterInstallWithoutStartTest.java         |  43 +-
 .../topology/ClusterTopologyImplTest.java       |   8 +-
 .../topology/ConfigureClusterTaskTest.java      |   8 +-
 .../server/topology/LogicalRequestTest.java     |  31 +-
 .../topology/RequiredPasswordValidatorTest.java |  32 +-
 .../server/topology/TopologyManagerTest.java    |  57 ++-
 .../validators/HiveServiceValidatorTest.java    |   6 +-
 .../RequiredConfigPropertiesValidatorTest.java  |  28 +-
 .../StackConfigTypeValidatorTest.java           |   2 +-
 .../server/upgrade/UpgradeCatalog251Test.java   |   2 +-
 .../server/upgrade/UpgradeCatalog300Test.java   |  22 +-
 .../utils/SynchronousThreadPoolExecutor.java    |   2 +-
 .../ambari/server/utils/TestParallel.java       |   2 +-
 .../server/view/RemoteAmbariClusterTest.java    |   7 +-
 .../view/ViewDataMigrationUtilityTest.java      |   4 +-
 .../ambari/server/view/ViewRegistryTest.java    |  20 +-
 .../view/ViewSubResourceProviderTest.java       |   4 +-
 .../server/view/events/EventImplTest.java       |   8 +-
 353 files changed, 1690 insertions(+), 1791 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/com/google/inject/persist/jpa/AmbariJpaPersistModule.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/com/google/inject/persist/jpa/AmbariJpaPersistModule.java b/ambari-server/src/main/java/com/google/inject/persist/jpa/AmbariJpaPersistModule.java
index 8c28e16..ec51627 100644
--- a/ambari-server/src/main/java/com/google/inject/persist/jpa/AmbariJpaPersistModule.java
+++ b/ambari-server/src/main/java/com/google/inject/persist/jpa/AmbariJpaPersistModule.java
@@ -69,7 +69,7 @@ public class AmbariJpaPersistModule extends PersistModule {
     if (null != properties) {
       bind(Properties.class).annotatedWith(Jpa.class).toInstance(properties);
     } else {
-      bind(Properties.class).annotatedWith(Jpa.class).toProvider(Providers.<Properties> of(null));
+      bind(Properties.class).annotatedWith(Jpa.class).toProvider(Providers.of(null));
     }
 
     bind(AmbariJpaPersistService.class).in(Singleton.class);

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionManager.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionManager.java b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionManager.java
index e809980..e6be43b 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionManager.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ActionManager.java
@@ -224,7 +224,7 @@ public class ActionManager {
   public List<Long> getRequestsByStatus(RequestStatus status, int maxResults, boolean ascOrder) {
     List<Long> requests = db.getRequestsByStatus(status, maxResults, ascOrder);
 
-    for (Request logicalRequest : topologyManager.getRequests(Collections.<Long>emptySet())) {
+    for (Request logicalRequest : topologyManager.getRequests(Collections.emptySet())) {
       //todo: Request.getStatus() returns HostRoleStatus and we are comparing to RequestStatus
       //todo: for now just compare the names as RequestStatus names are a subset of HostRoleStatus names
       HostRoleStatus logicalRequestStatus = logicalRequest.getStatus();

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ExecutionCommandWrapper.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ExecutionCommandWrapper.java b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ExecutionCommandWrapper.java
index 91db7d0..6785df9 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ExecutionCommandWrapper.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/ExecutionCommandWrapper.java
@@ -114,7 +114,7 @@ public class ExecutionCommandWrapper {
 
       // sanity; if no configurations, just initialize to prevent NPEs
       if (null == executionCommand.getConfigurations()) {
-        executionCommand.setConfigurations(new TreeMap<String, Map<String, String>>());
+        executionCommand.setConfigurations(new TreeMap<>());
       }
 
       Map<String, Map<String, String>> configurations = executionCommand.getConfigurations();
@@ -176,7 +176,7 @@ public class ExecutionCommandWrapper {
             configurations.get(type).putAll(mergedConfig);
 
           } else {
-            configurations.put(type, new HashMap<String, String>());
+            configurations.put(type, new HashMap<>());
             configurations.get(type).putAll(allLevelMergedConfig);
           }
         }
@@ -190,8 +190,7 @@ public class ExecutionCommandWrapper {
 
           if (executionCommand.getConfigurationAttributes() != null) {
             if (!executionCommand.getConfigurationAttributes().containsKey(type)) {
-              executionCommand.getConfigurationAttributes().put(type,
-                  new TreeMap<String, Map<String, String>>());
+              executionCommand.getConfigurationAttributes().put(type, new TreeMap<>());
             }
             configHelper.cloneAttributesMap(attributes,
                 executionCommand.getConfigurationAttributes().get(type));

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/Stage.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/Stage.java b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/Stage.java
index 3be66d4..f466ce9 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/Stage.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/actionmanager/Stage.java
@@ -35,7 +35,6 @@ import org.apache.ambari.server.agent.AgentCommand.AgentCommandType;
 import org.apache.ambari.server.agent.ExecutionCommand;
 import org.apache.ambari.server.metadata.RoleCommandPair;
 import org.apache.ambari.server.orm.dao.HostRoleCommandDAO;
-import org.apache.ambari.server.orm.entities.HostRoleCommandEntity;
 import org.apache.ambari.server.orm.entities.RoleSuccessCriteriaEntity;
 import org.apache.ambari.server.orm.entities.StageEntity;
 import org.apache.ambari.server.serveraction.ServerAction;
@@ -168,7 +167,7 @@ public class Stage {
       String hostname = getSafeHost(command.getHostName());
 
       if (!hostRoleCommands.containsKey(hostname)) {
-        hostRoleCommands.put(hostname, new LinkedHashMap<String, HostRoleCommand>());
+        hostRoleCommands.put(hostname, new LinkedHashMap<>());
       }
 
       hostRoleCommands.get(hostname).put(command.getRole().toString(), command);
@@ -191,8 +190,8 @@ public class Stage {
     stageEntity.setSkippable(skippable);
     stageEntity.setAutoSkipFailureSupported(supportsAutoSkipOnFailure);
     stageEntity.setRequestContext(requestContext);
-    stageEntity.setHostRoleCommands(new ArrayList<HostRoleCommandEntity>());
-    stageEntity.setRoleSuccessCriterias(new ArrayList<RoleSuccessCriteriaEntity>());
+    stageEntity.setHostRoleCommands(new ArrayList<>());
+    stageEntity.setRoleSuccessCriterias(new ArrayList<>());
     stageEntity.setCommandParamsStage(commandParamsStage);
     if (null != hostParamsStage) {
       stageEntity.setHostParamsStage(hostParamsStage);
@@ -225,7 +224,7 @@ public class Stage {
   void loadExecutionCommandWrappers() {
     for (Map.Entry<String, Map<String, HostRoleCommand>> hostRoleCommandEntry : hostRoleCommands.entrySet()) {
       String hostname = hostRoleCommandEntry.getKey();
-      commandsToSend.put(hostname, new ArrayList<ExecutionCommandWrapper>());
+      commandsToSend.put(hostname, new ArrayList<>());
       Map<String, HostRoleCommand> roleCommandMap = hostRoleCommandEntry.getValue();
       for (Map.Entry<String, HostRoleCommand> roleCommandEntry : roleCommandMap.entrySet()) {
         commandsToSend.get(hostname).add(roleCommandEntry.getValue().getExecutionCommandWrapper());
@@ -813,12 +812,12 @@ public class Stage {
 
     String role = r.toString();
     if (commandsToSend.get(hostname) == null) {
-      commandsToSend.put(hostname, new ArrayList<ExecutionCommandWrapper>());
+      commandsToSend.put(hostname, new ArrayList<>());
     }
     commandsToSend.get(hostname).add(
         origStage.getExecutionCommandWrapper(hostname, role));
     if (hostRoleCommands.get(hostname) == null) {
-      hostRoleCommands.put(hostname, new LinkedHashMap<String, HostRoleCommand>());
+      hostRoleCommands.put(hostname, new LinkedHashMap<>());
     }
     // TODO add reference to ExecutionCommand into HostRoleCommand
     hostRoleCommands.get(hostname).put(role,

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/agent/ActionQueue.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/agent/ActionQueue.java b/ambari-server/src/main/java/org/apache/ambari/server/agent/ActionQueue.java
index 1e13e25..f063451 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/agent/ActionQueue.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/agent/ActionQueue.java
@@ -83,7 +83,7 @@ public class ActionQueue {
 
     if (q == null) {
       //try to add new queue to map if not found
-      q = hostQueues.putIfAbsent(hostname, new ConcurrentLinkedQueue<AgentCommand>());
+      q = hostQueues.putIfAbsent(hostname, new ConcurrentLinkedQueue<>());
       if (q == null) {
         //null means that new queue was added to map, get it
         q = getQueue(hostname);

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/agent/AgentRequests.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/agent/AgentRequests.java b/ambari-server/src/main/java/org/apache/ambari/server/agent/AgentRequests.java
index 8457bb8..8e5c803 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/agent/AgentRequests.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/agent/AgentRequests.java
@@ -71,7 +71,7 @@ public class AgentRequests {
     if (!requiresExecCmdDetails.containsKey(host)) {
       synchronized (_lock) {
         if (!requiresExecCmdDetails.containsKey(host)) {
-          requiresExecCmdDetails.put(host, new HashMap<String, Boolean>());
+          requiresExecCmdDetails.put(host, new HashMap<>());
         }
       }
     }

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartBeatHandler.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartBeatHandler.java b/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartBeatHandler.java
index 92ab3de..53cceb0 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartBeatHandler.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/agent/HeartBeatHandler.java
@@ -516,7 +516,7 @@ public class HeartBeatHandler {
     Map<String, Map<String, String>> componentsMap = new HashMap<>();
 
     for (org.apache.ambari.server.state.Service service : cluster.getServices().values()) {
-      componentsMap.put(service.getName(), new HashMap<String, String>());
+      componentsMap.put(service.getName(), new HashMap<>());
 
       for (ServiceComponent component : service.getServiceComponents().values()) {
         StackId stackId = component.getDesiredStackId();

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/alerts/StaleAlertRunnable.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/alerts/StaleAlertRunnable.java b/ambari-server/src/main/java/org/apache/ambari/server/alerts/StaleAlertRunnable.java
index 4f89eaa..1095d23 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/alerts/StaleAlertRunnable.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/alerts/StaleAlertRunnable.java
@@ -205,7 +205,7 @@ public class StaleAlertRunnable extends AlertRunnable {
           String hostName = history.getHostName();
           hostsWithStaleAlerts.add(hostName);
           if (!staleAlertsByHost.containsKey(hostName)) {
-            staleAlertsByHost.put(hostName, new TreeSet<String>());
+            staleAlertsByHost.put(hostName, new TreeSet<>());
           }
 
           staleAlertsByHost.get(hostName).add(MessageFormat.format(TIMED_LABEL_MSG, label,

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/api/predicate/QueryLexer.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/predicate/QueryLexer.java b/ambari-server/src/main/java/org/apache/ambari/server/api/predicate/QueryLexer.java
index a9ab185..b72bc48 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/predicate/QueryLexer.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/predicate/QueryLexer.java
@@ -122,7 +122,7 @@ public class QueryLexer {
    * @throws InvalidQueryException if the query is invalid
    */
   public Token[] tokens(String exp) throws InvalidQueryException {
-    return tokens(exp, Collections.<String>emptySet());
+    return tokens(exp, Collections.emptySet());
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/api/predicate/expressions/LogicalExpression.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/predicate/expressions/LogicalExpression.java b/ambari-server/src/main/java/org/apache/ambari/server/api/predicate/expressions/LogicalExpression.java
index b519c07..0ebbe69 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/predicate/expressions/LogicalExpression.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/predicate/expressions/LogicalExpression.java
@@ -53,7 +53,7 @@ public class LogicalExpression extends AbstractExpression<Expression> {
     if (getOperator().getPrecedence() == precedence && getLeftOperand() == null) {
       setLeftOperand(left);
       setRightOperand(right);
-      return Collections.<Expression>singletonList(this);
+      return Collections.singletonList(this);
     } else {
       return defaultMerge(left, right);
     }

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/api/query/QueryImpl.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/query/QueryImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/api/query/QueryImpl.java
index 25fd143..a65839a 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/query/QueryImpl.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/query/QueryImpl.java
@@ -296,7 +296,7 @@ public class QueryImpl implements Query, ResourceInstance {
 
   @Override
   public Map<String, ResourceInstance> getSubResources() {
-    return new HashMap<String, ResourceInstance>(ensureSubResources());
+    return new HashMap<>(ensureSubResources());
   }
 
 
@@ -998,7 +998,7 @@ public class QueryImpl implements Query, ResourceInstance {
     }
 
     if (allProperties) {
-      return PropertyHelper.getReadRequest(Collections.<String> emptySet(),
+      return PropertyHelper.getReadRequest(Collections.emptySet(),
           requestInfoProperties, null, pageRequest, sortRequest);
     }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/api/query/render/ClusterBlueprintRenderer.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/query/render/ClusterBlueprintRenderer.java b/ambari-server/src/main/java/org/apache/ambari/server/api/query/render/ClusterBlueprintRenderer.java
index b00391a..acdf9ed 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/query/render/ClusterBlueprintRenderer.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/query/render/ClusterBlueprintRenderer.java
@@ -102,22 +102,22 @@ public class ClusterBlueprintRenderer extends BaseRenderer implements Renderer {
 
     String configType = Resource.Type.Configuration.name();
     if (resultTree.getChild(configType) == null) {
-      resultTree.addChild(new HashSet<String>(), configType);
+      resultTree.addChild(new HashSet<>(), configType);
     }
 
     String serviceType = Resource.Type.Service.name();
     if (resultTree.getChild(serviceType) == null) {
-      resultTree.addChild(new HashSet<String>(), serviceType);
+      resultTree.addChild(new HashSet<>(), serviceType);
     }
     TreeNode<Set<String>> serviceNode = resultTree.getChild(serviceType);
     if (serviceNode == null) {
-      serviceNode = resultTree.addChild(new HashSet<String>(), serviceType);
+      serviceNode = resultTree.addChild(new HashSet<>(), serviceType);
     }
     String serviceComponentType = Resource.Type.Component.name();
     TreeNode<Set<String>> serviceComponentNode = resultTree.getChild(
       serviceType + "/" + serviceComponentType);
     if (serviceComponentNode == null) {
-      serviceComponentNode = serviceNode.addChild(new HashSet<String>(), serviceComponentType);
+      serviceComponentNode = serviceNode.addChild(new HashSet<>(), serviceComponentType);
     }
     serviceComponentNode.getObject().add("ServiceComponentInfo/cluster_name");
     serviceComponentNode.getObject().add("ServiceComponentInfo/service_name");
@@ -132,9 +132,9 @@ public class ClusterBlueprintRenderer extends BaseRenderer implements Renderer {
     if (hostComponentNode == null) {
       TreeNode<Set<String>> hostNode = resultTree.getChild(hostType);
       if (hostNode == null) {
-        hostNode = resultTree.addChild(new HashSet<String>(), hostType);
+        hostNode = resultTree.addChild(new HashSet<>(), hostType);
       }
-      hostComponentNode = hostNode.addChild(new HashSet<String>(), hostComponentType);
+      hostComponentNode = hostNode.addChild(new HashSet<>(), hostComponentType);
     }
     resultTree.getChild(configType).getObject().add("properties");
     hostComponentNode.getObject().add("HostRoles/component_name");
@@ -345,8 +345,8 @@ public class ClusterBlueprintRenderer extends BaseRenderer implements Renderer {
     ResourceProvider artifactProvider =
        clusterController.ensureResourceProvider(Resource.Type.Artifact);
 
-    org.apache.ambari.server.controller.spi.Request request = new RequestImpl(Collections.<String>emptySet(),
-      Collections.<Map<String, Object>>emptySet(), Collections.<String, String>emptyMap(), null);
+    org.apache.ambari.server.controller.spi.Request request = new RequestImpl(Collections.emptySet(),
+      Collections.emptySet(), Collections.emptyMap(), null);
 
     Set<Resource> response = null;
     try {

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/api/resources/RequestScheduleResourceDefinition.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/RequestScheduleResourceDefinition.java b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/RequestScheduleResourceDefinition.java
index f3c1b83..57e0579 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/RequestScheduleResourceDefinition.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/RequestScheduleResourceDefinition.java
@@ -42,7 +42,7 @@ public class RequestScheduleResourceDefinition extends BaseResourceDefinition {
 
   @Override
   public List<PostProcessor> getPostProcessors() {
-    return Collections.<PostProcessor>singletonList(new
+    return Collections.singletonList(new
       RequestScheduleHrefPostProcessor());
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java
index 96e288f..d0d115d 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ResourceInstanceFactoryImpl.java
@@ -262,7 +262,7 @@ public class ResourceInstanceFactoryImpl implements ResourceInstanceFactory {
         String version  = mapIds.get(Resource.Type.ViewVersion);
 
         Set<SubResourceDefinition> subResourceDefinitions = (viewName == null || version == null)  ?
-            Collections.<SubResourceDefinition>emptySet() :
+            Collections.emptySet() :
             ViewRegistry.getInstance().getSubResourceDefinitions(viewName, version);
 
         resourceDefinition = new ViewInstanceResourceDefinition(subResourceDefinitions);

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/api/resources/SubResourceDefinition.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/SubResourceDefinition.java b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/SubResourceDefinition.java
index c66b6cd..ede4eb3 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/SubResourceDefinition.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/SubResourceDefinition.java
@@ -85,7 +85,7 @@ public class SubResourceDefinition {
    * @return  set of additional foreign key properties
    */
   public Set<Resource.Type> getAdditionalForeignKeys() {
-    return m_setForeignKeys == null ? Collections.<Resource.Type>emptySet() : m_setForeignKeys;
+    return m_setForeignKeys == null ? Collections.emptySet() : m_setForeignKeys;
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ViewInstanceResourceDefinition.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ViewInstanceResourceDefinition.java b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ViewInstanceResourceDefinition.java
index f7920a4..7215474 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ViewInstanceResourceDefinition.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/resources/ViewInstanceResourceDefinition.java
@@ -42,7 +42,7 @@ public class ViewInstanceResourceDefinition extends BaseResourceDefinition {
   public ViewInstanceResourceDefinition(Set<SubResourceDefinition> subResourceDefinitions) {
     super(Resource.Type.ViewInstance);
 
-    this.subResourceDefinitions = subResourceDefinitions == null ? new HashSet<SubResourceDefinition>() :
+    this.subResourceDefinitions = subResourceDefinitions == null ? new HashSet<>() :
       new HashSet<>(subResourceDefinitions);
 
     this.subResourceDefinitions.add(new SubResourceDefinition(Resource.Type.ViewPrivilege));

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java
index e991b72..eb97ee3 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java
@@ -385,8 +385,7 @@ public class AmbariMetaInfo {
     Map<String, List<RepositoryInfo>> reposResult = new HashMap<>();
     for (RepositoryInfo repo : repository) {
       if (!reposResult.containsKey(repo.getOsType())) {
-        reposResult.put(repo.getOsType(),
-          new ArrayList<RepositoryInfo>());
+        reposResult.put(repo.getOsType(), new ArrayList<>());
       }
       reposResult.get(repo.getOsType()).add(repo);
     }
@@ -1244,7 +1243,7 @@ public class AmbariMetaInfo {
     try {
       StackInfo stack = getStack(stackName, stackVersion);
       return stack.getUpgradePacks() == null ?
-          Collections.<String, UpgradePack>emptyMap() : stack.getUpgradePacks();
+          Collections.emptyMap() : stack.getUpgradePacks();
 
     } catch (AmbariException e) {
       LOG.debug("Cannot load upgrade packs for non-existent stack {}-{}", stackName, stackVersion, e);

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewUrlsService.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewUrlsService.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewUrlsService.java
index fadcc72..d07e085 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewUrlsService.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/ViewUrlsService.java
@@ -55,7 +55,7 @@ public class ViewUrlsService extends BaseService {
   @GET @ApiIgnore // until documented
   @Produces("text/plain")
   public Response getViewUrls(@Context HttpHeaders headers, @Context UriInfo ui) {
-    return handleRequest(headers, null, ui, Request.Type.GET, createViewUrlResource(Optional.<String>absent()));
+    return handleRequest(headers, null, ui, Request.Type.GET, createViewUrlResource(Optional.absent()));
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/api/services/parsers/JsonRequestBodyParser.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/parsers/JsonRequestBodyParser.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/parsers/JsonRequestBodyParser.java
index 504bf04..eaa652e 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/parsers/JsonRequestBodyParser.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/parsers/JsonRequestBodyParser.java
@@ -129,8 +129,7 @@ public class JsonRequestBodyParser implements RequestBodyParser {
             // All remain nodes will be also primitives
             primitives.add(next.asText());
           } else {
-            NamedPropertySet arrayPropertySet = new NamedPropertySet(name,
-                new HashMap<String, Object>());
+            NamedPropertySet arrayPropertySet = new NamedPropertySet(name, new HashMap<>());
             processNode(next, "", arrayPropertySet, requestInfoProps);
             arraySet.add(arrayPropertySet.getProperties());
           }

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/api/services/persistence/PersistenceManagerImpl.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/persistence/PersistenceManagerImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/persistence/PersistenceManagerImpl.java
index 078dce8..d04a948 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/persistence/PersistenceManagerImpl.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/persistence/PersistenceManagerImpl.java
@@ -82,7 +82,7 @@ public class PersistenceManagerImpl implements PersistenceManager {
 
       Set<NamedPropertySet> setProperties = requestBody.getNamedPropertySets();
       if (setProperties.isEmpty()) {
-        requestBody.addPropertySet(new NamedPropertySet("", new HashMap<String, Object>()));
+        requestBody.addPropertySet(new NamedPropertySet("", new HashMap<>()));
       }
 
       for (NamedPropertySet propertySet : setProperties) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/api/services/serializers/JsonSerializer.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/serializers/JsonSerializer.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/serializers/JsonSerializer.java
index 4cb2208..0604d2b 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/serializers/JsonSerializer.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/serializers/JsonSerializer.java
@@ -191,8 +191,7 @@ public class JsonSerializer implements ResultSerializer {
   }
 
   private TreeNode<Map<String, Object>> getTreeProperties (Map<String, Map<String, Object>> propertiesMap) {
-    TreeNode<Map<String, Object>> treeProperties =
-        new TreeNodeImpl<Map<String, Object>>(null, new LinkedHashMap<String, Object>(), null);
+    TreeNode<Map<String, Object>> treeProperties = new TreeNodeImpl<>(null, new LinkedHashMap<>(), null);
 
     for (Map.Entry<String, Map<String, Object>> entry : propertiesMap.entrySet()) {
       String category = entry.getKey();
@@ -207,7 +206,7 @@ public class JsonSerializer implements ResultSerializer {
           for (String t : tokens) {
             TreeNode<Map<String, Object>> child = node.getChild(t);
             if (child == null) {
-              child = node.addChild(new LinkedHashMap<String, Object>(), t);
+              child = node.addChild(new LinkedHashMap<>(), t);
             }
             node = child;
           }

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/StackAdvisorRunner.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/StackAdvisorRunner.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/StackAdvisorRunner.java
index 90b95b3..3ba9f6b 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/StackAdvisorRunner.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/stackadvisor/StackAdvisorRunner.java
@@ -188,7 +188,7 @@ public class StackAdvisorRunner {
     String servicesFile = actionDirectory + File.separator + "services.json";
 
     // includes the original command plus the arguments for it
-    List<String> builderParameters = new ArrayList<String>();
+    List<String> builderParameters = new ArrayList<>();
 
     switch (serviceAdvisorType) {
       case PYTHON:

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/audit/AsyncAuditLogger.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/audit/AsyncAuditLogger.java b/ambari-server/src/main/java/org/apache/ambari/server/audit/AsyncAuditLogger.java
index b843dd8..1e300bd 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/audit/AsyncAuditLogger.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/audit/AsyncAuditLogger.java
@@ -63,7 +63,7 @@ class AsyncAuditLogger implements AuditLogger {
     isEnabled = configuration.isAuditLogEnabled();
     if(isEnabled) {
       eventBus = new AsyncEventBus("AuditLoggerEventBus", new ThreadPoolExecutor(0, 1, 5L, TimeUnit.MINUTES,
-        new LinkedBlockingQueue<Runnable>(configuration.getAuditLoggerCapacity()), new AuditLogThreadFactory(),
+        new LinkedBlockingQueue<>(configuration.getAuditLoggerCapacity()), new AuditLogThreadFactory(),
         new ThreadPoolExecutor.CallerRunsPolicy()));
       eventBus.register(auditLogger);
     }

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/audit/request/eventcreator/PrivilegeEventCreator.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/audit/request/eventcreator/PrivilegeEventCreator.java b/ambari-server/src/main/java/org/apache/ambari/server/audit/request/eventcreator/PrivilegeEventCreator.java
index 8f03655..cd37d63 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/audit/request/eventcreator/PrivilegeEventCreator.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/audit/request/eventcreator/PrivilegeEventCreator.java
@@ -133,7 +133,7 @@ public class PrivilegeEventCreator implements RequestAuditEventCreator {
         String role = String.valueOf(propertyMap.get(PrivilegeResourceProvider.PERMISSION_NAME_PROPERTY_ID));
         String name = String.valueOf(propertyMap.get(PrivilegeResourceProvider.PRINCIPAL_NAME_PROPERTY_ID));
         if (!entities.containsKey(role)) {
-          entities.put(role, new LinkedList<String>());
+          entities.put(role, new LinkedList<>());
         }
 
         entities.get(role).add(name);

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/audit/request/eventcreator/RepositoryVersionEventCreator.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/audit/request/eventcreator/RepositoryVersionEventCreator.java b/ambari-server/src/main/java/org/apache/ambari/server/audit/request/eventcreator/RepositoryVersionEventCreator.java
index d324b04..476c4e7 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/audit/request/eventcreator/RepositoryVersionEventCreator.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/audit/request/eventcreator/RepositoryVersionEventCreator.java
@@ -162,7 +162,7 @@ public class RepositoryVersionEventCreator implements RequestAuditEventCreator {
         Map<?, ?> map = (Map<?, ?>) entry;
         String osType = (String) map.get(OperatingSystemResourceProvider.OPERATING_SYSTEM_OS_TYPE_PROPERTY_ID);
         if (!result.containsKey(osType)) {
-          result.put(osType, new LinkedList<Map<String, String>>());
+          result.put(osType, new LinkedList<>());
         }
         if (map.get("repositories") instanceof Set) {
           Set<?> repos = (Set<?>) map.get("repositories");

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/audit/request/eventcreator/ViewPrivilegeEventCreator.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/audit/request/eventcreator/ViewPrivilegeEventCreator.java b/ambari-server/src/main/java/org/apache/ambari/server/audit/request/eventcreator/ViewPrivilegeEventCreator.java
index 3042772..3e5b7ed 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/audit/request/eventcreator/ViewPrivilegeEventCreator.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/audit/request/eventcreator/ViewPrivilegeEventCreator.java
@@ -118,7 +118,7 @@ public class ViewPrivilegeEventCreator implements RequestAuditEventCreator {
         String role = String.valueOf(propertyMap.get(ViewPrivilegeResourceProvider.PERMISSION_NAME_PROPERTY_ID));
         String name = String.valueOf(propertyMap.get(ViewPrivilegeResourceProvider.PRINCIPAL_NAME_PROPERTY_ID));
         if (!entities.containsKey(role)) {
-          entities.put(role, new LinkedList<String>());
+          entities.put(role, new LinkedList<>());
         }
 
         entities.get(role).add(name);

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/bootstrap/BootStrapImpl.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/bootstrap/BootStrapImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/bootstrap/BootStrapImpl.java
index bfe40ea..d3f6838 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/bootstrap/BootStrapImpl.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/bootstrap/BootStrapImpl.java
@@ -116,7 +116,7 @@ public class BootStrapImpl {
     if (info.getHosts() == null || info.getHosts().isEmpty()) {
       BootStrapStatus status = new BootStrapStatus();
       status.setLog("Host list is empty.");
-      status.setHostsStatus(new ArrayList<BSHostStatus>());
+      status.setHostsStatus(new ArrayList<>());
       status.setStatus(BootStrapStatus.BSStat.ERROR);
       updateStatus(requestId, status);
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/checks/AbstractCheckDescriptor.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/checks/AbstractCheckDescriptor.java b/ambari-server/src/main/java/org/apache/ambari/server/checks/AbstractCheckDescriptor.java
index 4eae3aa..6726d30 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/checks/AbstractCheckDescriptor.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/checks/AbstractCheckDescriptor.java
@@ -127,7 +127,7 @@ public abstract class AbstractCheckDescriptor {
    *           if server error happens
    */
   public final boolean isApplicable(PrereqCheckRequest request) throws AmbariException {
-    List<CheckQualification> qualifications = Lists.<CheckQualification> newArrayList(
+    List<CheckQualification> qualifications = Lists.newArrayList(
         new ServiceQualification());
 
     // add any others from the concrete check

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/checks/DatabaseConsistencyCheckHelper.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/checks/DatabaseConsistencyCheckHelper.java b/ambari-server/src/main/java/org/apache/ambari/server/checks/DatabaseConsistencyCheckHelper.java
index b440c93..66baf8e 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/checks/DatabaseConsistencyCheckHelper.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/checks/DatabaseConsistencyCheckHelper.java
@@ -774,7 +774,7 @@ public class DatabaseConsistencyCheckHelper {
         }
         // Check if the right schema is first on the search path
         List<Object> searchPathResultColumn = getResultSetColumn(searchPathRs, "search_path");
-        List<String> searchPath = searchPathResultColumn.isEmpty() ? ImmutableList.<String>of() :
+        List<String> searchPath = searchPathResultColumn.isEmpty() ? ImmutableList.of() :
             ImmutableList.copyOf(Splitter.on(",").trimResults().split(String.valueOf(searchPathResultColumn.get(0))));
         String firstSearchPathItem = searchPath.isEmpty() ? null : searchPath.get(0);
         if (!Objects.equals(firstSearchPathItem, conf.getDatabaseSchema())) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/checks/SecondaryNamenodeDeletedCheck.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/checks/SecondaryNamenodeDeletedCheck.java b/ambari-server/src/main/java/org/apache/ambari/server/checks/SecondaryNamenodeDeletedCheck.java
index e83b118..508116d 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/checks/SecondaryNamenodeDeletedCheck.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/checks/SecondaryNamenodeDeletedCheck.java
@@ -67,7 +67,7 @@ public class SecondaryNamenodeDeletedCheck extends AbstractCheckDescriptor {
    */
   @Override
   public List<CheckQualification> getQualifications() {
-    return Arrays.<CheckQualification> asList(
+    return Arrays.asList(
         new PriorCheckQualification(CheckDescription.SERVICES_NAMENODE_HA));
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/checks/ServicesMapReduceDistributedCacheCheck.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/checks/ServicesMapReduceDistributedCacheCheck.java b/ambari-server/src/main/java/org/apache/ambari/server/checks/ServicesMapReduceDistributedCacheCheck.java
index ab7e798..e24e669 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/checks/ServicesMapReduceDistributedCacheCheck.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/checks/ServicesMapReduceDistributedCacheCheck.java
@@ -62,7 +62,7 @@ public class ServicesMapReduceDistributedCacheCheck extends AbstractCheckDescrip
    */
   @Override
   public List<CheckQualification> getQualifications() {
-    return Arrays.<CheckQualification> asList(
+    return Arrays.asList(
         new PriorCheckQualification(CheckDescription.SERVICES_NAMENODE_HA));
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/checks/ServicesNamenodeTruncateCheck.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/checks/ServicesNamenodeTruncateCheck.java b/ambari-server/src/main/java/org/apache/ambari/server/checks/ServicesNamenodeTruncateCheck.java
index ce1b4bf..4d9e7d7 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/checks/ServicesNamenodeTruncateCheck.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/checks/ServicesNamenodeTruncateCheck.java
@@ -58,7 +58,7 @@ public class ServicesNamenodeTruncateCheck extends AbstractCheckDescriptor {
    */
   @Override
   public List<CheckQualification> getQualifications() {
-    return Arrays.<CheckQualification> asList(
+    return Arrays.asList(
         new PriorCheckQualification(CheckDescription.SERVICES_NAMENODE_HA));
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/checks/ServicesTezDistributedCacheCheck.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/checks/ServicesTezDistributedCacheCheck.java b/ambari-server/src/main/java/org/apache/ambari/server/checks/ServicesTezDistributedCacheCheck.java
index cb0c9ae..8331ebf 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/checks/ServicesTezDistributedCacheCheck.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/checks/ServicesTezDistributedCacheCheck.java
@@ -64,7 +64,7 @@ public class ServicesTezDistributedCacheCheck extends AbstractCheckDescriptor {
    */
   @Override
   public List<CheckQualification> getQualifications() {
-    return Arrays.<CheckQualification> asList(
+    return Arrays.asList(
         new PriorCheckQualification(CheckDescription.SERVICES_NAMENODE_HA));
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/checks/YarnTimelineServerStatePreservingCheck.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/checks/YarnTimelineServerStatePreservingCheck.java b/ambari-server/src/main/java/org/apache/ambari/server/checks/YarnTimelineServerStatePreservingCheck.java
index f41b34c..27d4ace 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/checks/YarnTimelineServerStatePreservingCheck.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/checks/YarnTimelineServerStatePreservingCheck.java
@@ -67,7 +67,7 @@ public class YarnTimelineServerStatePreservingCheck extends AbstractCheckDescrip
    */
   @Override
   public List<CheckQualification> getQualifications() {
-    return Lists.<CheckQualification> newArrayList(new YarnTimelineServerMinVersionQualification());
+    return Lists.newArrayList(new YarnTimelineServerMinVersionQualification());
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/collections/functors/ContainsPredicate.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/collections/functors/ContainsPredicate.java b/ambari-server/src/main/java/org/apache/ambari/server/collections/functors/ContainsPredicate.java
index 0f867db..a79dcbf 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/collections/functors/ContainsPredicate.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/collections/functors/ContainsPredicate.java
@@ -112,7 +112,7 @@ public class ContainsPredicate extends OperationPredicate {
 
   @Override
   public Map<String, Object> toMap() {
-    return Collections.<String, Object>singletonMap(NAME,
+    return Collections.singletonMap(NAME,
       new ArrayList<>(Arrays.asList(getContextKey(), value)));
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/collections/functors/DelegatedMultiplePredicateContainer.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/collections/functors/DelegatedMultiplePredicateContainer.java b/ambari-server/src/main/java/org/apache/ambari/server/collections/functors/DelegatedMultiplePredicateContainer.java
index b48337e..229f1ec 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/collections/functors/DelegatedMultiplePredicateContainer.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/collections/functors/DelegatedMultiplePredicateContainer.java
@@ -51,7 +51,7 @@ abstract class DelegatedMultiplePredicateContainer extends Predicate implements
 
   @Override
   public Map<String, Object> toMap() {
-    return Collections.<String, Object>singletonMap(getName(), containedPredicatesToMaps());
+    return Collections.singletonMap(getName(), containedPredicatesToMaps());
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/collections/functors/DelegatedSinglePredicateContainer.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/collections/functors/DelegatedSinglePredicateContainer.java b/ambari-server/src/main/java/org/apache/ambari/server/collections/functors/DelegatedSinglePredicateContainer.java
index ace4d57..ed44151 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/collections/functors/DelegatedSinglePredicateContainer.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/collections/functors/DelegatedSinglePredicateContainer.java
@@ -48,7 +48,7 @@ abstract class DelegatedSinglePredicateContainer extends Predicate implements Pr
 
   @Override
   public Map<String, Object> toMap() {
-    return Collections.<String, Object>singletonMap(getName(), containedPredicateToMap());
+    return Collections.singletonMap(getName(), containedPredicateToMap());
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/collections/functors/EqualsPredicate.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/collections/functors/EqualsPredicate.java b/ambari-server/src/main/java/org/apache/ambari/server/collections/functors/EqualsPredicate.java
index 36efe17..f1bba47 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/collections/functors/EqualsPredicate.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/collections/functors/EqualsPredicate.java
@@ -103,7 +103,7 @@ public class EqualsPredicate extends OperationPredicate {
 
   @Override
   public Map<String, Object> toMap() {
-    return Collections.<String, Object>singletonMap(NAME,
+    return Collections.singletonMap(NAME,
       new ArrayList<>(Arrays.asList(getContextKey(), delegate.getValue().toString())));
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariActionExecutionHelper.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariActionExecutionHelper.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariActionExecutionHelper.java
index 55356c7..0f6eb90 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariActionExecutionHelper.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariActionExecutionHelper.java
@@ -426,8 +426,8 @@ public class AmbariActionExecutionHelper {
 
       // !!! ensure that these are empty so that commands have the correct tags
       // applied when the execution is about to be scheduled to run
-      execCmd.setConfigurations(new TreeMap<String, Map<String, String>>());
-      execCmd.setConfigurationAttributes(new TreeMap<String, Map<String, Map<String, String>>>());
+      execCmd.setConfigurations(new TreeMap<>());
+      execCmd.setConfigurationAttributes(new TreeMap<>());
 
       // if the command should fetch brand new configuration tags before
       // execution, then we don't need to fetch them now

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
index b4d9608..cd2f9d9 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
@@ -528,20 +528,18 @@ public class AmbariManagementControllerImpl implements AmbariManagementControlle
       }
 
       if (!hostComponentNames.containsKey(request.getClusterName())) {
-        hostComponentNames.put(request.getClusterName(),
-            new HashMap<String, Map<String,Set<String>>>());
+        hostComponentNames.put(request.getClusterName(), new HashMap<>());
       }
       if (!hostComponentNames.get(request.getClusterName())
           .containsKey(request.getServiceName())) {
         hostComponentNames.get(request.getClusterName()).put(
-            request.getServiceName(), new HashMap<String, Set<String>>());
+            request.getServiceName(), new HashMap<>());
       }
       if (!hostComponentNames.get(request.getClusterName())
           .get(request.getServiceName())
           .containsKey(request.getComponentName())) {
         hostComponentNames.get(request.getClusterName())
-            .get(request.getServiceName()).put(request.getComponentName(),
-                new HashSet<String>());
+            .get(request.getServiceName()).put(request.getComponentName(), new HashSet<>());
       }
       if (hostComponentNames.get(request.getClusterName())
           .get(request.getServiceName())
@@ -1397,8 +1395,8 @@ public class AmbariManagementControllerImpl implements AmbariManagementControlle
                 cluster.getClusterName(), config.getStackId(),
                 request.getType(),
                 config.getTag(), entry.getValue().getVersion(),
-                includeProps ? config.getProperties() : new HashMap<String, String>(),
-                includeProps ? config.getPropertiesAttributes() : new HashMap<String, Map<String,String>>(),
+                includeProps ? config.getProperties() : new HashMap<>(),
+                includeProps ? config.getPropertiesAttributes() : new HashMap<>(),
                 config.getPropertiesTypes());
             responses.add(response);
           }
@@ -1411,8 +1409,8 @@ public class AmbariManagementControllerImpl implements AmbariManagementControlle
           ConfigurationResponse response = new ConfigurationResponse(
               cluster.getClusterName(), config.getStackId(), config.getType(),
               config.getTag(), config.getVersion(),
-              includeProps ? config.getProperties() : new HashMap<String, String>(),
-              includeProps ? config.getPropertiesAttributes() : new HashMap<String, Map<String,String>>(),
+              includeProps ? config.getProperties() : new HashMap<>(),
+              includeProps ? config.getPropertiesAttributes() : new HashMap<>(),
               config.getPropertiesTypes());
 
           responses.add(response);
@@ -2140,8 +2138,7 @@ public class AmbariManagementControllerImpl implements AmbariManagementControlle
             continue;
           }
           if (!changedComponentCount.containsKey(sch.getServiceName())) {
-            changedComponentCount.put(sch.getServiceName(),
-              new HashMap<String, Integer>());
+            changedComponentCount.put(sch.getServiceName(), new HashMap<>());
           }
           if (!changedComponentCount.get(sch.getServiceName())
             .containsKey(sch.getServiceComponentName())) {
@@ -3231,7 +3228,7 @@ public class AmbariManagementControllerImpl implements AmbariManagementControlle
 
       if (ec.getConfigurationAttributes() != null) {
         if (!ec.getConfigurationAttributes().containsKey(type)) {
-          ec.getConfigurationAttributes().put(type, new TreeMap<String, Map<String, String>>());
+          ec.getConfigurationAttributes().put(type, new TreeMap<>());
         }
         configHelper.cloneAttributesMap(attributes, ec.getConfigurationAttributes().get(type));
       }
@@ -3345,7 +3342,7 @@ public class AmbariManagementControllerImpl implements AmbariManagementControlle
               //Filter services whose masters are not started
               if (isServiceComponentStartedOnAnyHost(cluster, serviceName, masterComponentName)) {
                 serviceMasterForDecommissionMap.put(serviceName, masterComponentName);
-                masterSlaveHostsMap.putIfAbsent(masterComponentName, new HashSet<String>());
+                masterSlaveHostsMap.putIfAbsent(masterComponentName, new HashSet<>());
                 masterSlaveHostsMap.get(masterComponentName).add(sch.getHostName());
               } else {
                 LOG.info(String.format("Not adding %s service from include/exclude files refresh map because it's master is not started", serviceName));
@@ -3608,7 +3605,7 @@ public class AmbariManagementControllerImpl implements AmbariManagementControlle
       try {
         checkIfHostComponentsInDeleteFriendlyState(request, cluster);
         if (!safeToRemoveSCHs.containsKey(component)) {
-          safeToRemoveSCHs.put(component, new HashSet<ServiceComponentHost>());
+          safeToRemoveSCHs.put(component, new HashSet<>());
         }
         safeToRemoveSCHs.get(component).add(componentHost);
       } catch (Exception ex) {
@@ -3637,7 +3634,7 @@ public class AmbariManagementControllerImpl implements AmbariManagementControlle
             if (clusterServiceMasterForDecommissionMap.containsKey(componentHost.getClusterName())) {
               clusterServiceMasterForDecommissionMap.get(componentHost.getClusterName()).put(componentHost.getServiceName(), masterComponentName);
               Map<String, Set<String>> masterSlaveMap  = clusterMasterSlaveHostsMap.get(componentHost.getClusterName());
-              masterSlaveMap.putIfAbsent(masterComponentName, new HashSet<String>());
+              masterSlaveMap.putIfAbsent(masterComponentName, new HashSet<>());
               masterSlaveMap.get(masterComponentName).add(componentHost.getHostName());
             } else {
               Map<String, String> serviceMasterMap = new HashMap<>();
@@ -3645,7 +3642,7 @@ public class AmbariManagementControllerImpl implements AmbariManagementControlle
               clusterServiceMasterForDecommissionMap.put(componentHost.getClusterName(), serviceMasterMap);
 
               Map<String, Set<String>> masterSlaveHostsMap = new HashMap<>();
-              masterSlaveHostsMap.put(masterComponentName, new HashSet<String>(Collections.singletonList(componentHost.getHostName())));
+              masterSlaveHostsMap.put(masterComponentName, new HashSet<>(Collections.singletonList(componentHost.getHostName())));
               clusterMasterSlaveHostsMap.put(componentHost.getClusterName(), masterSlaveHostsMap);
             }
           }
@@ -5240,7 +5237,7 @@ public class AmbariManagementControllerImpl implements AmbariManagementControlle
       widgetEntity.setMetrics(gson.toJson(layoutInfo.getMetricsInfo()));
       widgetEntity.setProperties(gson.toJson(layoutInfo.getProperties()));
       widgetEntity.setWidgetValues(gson.toJson(layoutInfo.getValues()));
-      widgetEntity.setListWidgetLayoutUserWidgetEntity(new LinkedList<WidgetLayoutUserWidgetEntity>());
+      widgetEntity.setListWidgetLayoutUserWidgetEntity(new LinkedList<>());
       LOG.info("Creating cluster widget with: name = " +
         layoutInfo.getWidgetName() + ", type = " + layoutInfo.getType() + ", " +
         "cluster = " + clusterEntity.getClusterName());

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/controller/ConfigGroupResponse.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/ConfigGroupResponse.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/ConfigGroupResponse.java
index 937df46..486f2c8 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/ConfigGroupResponse.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/ConfigGroupResponse.java
@@ -29,7 +29,7 @@ public class ConfigGroupResponse {
   private String description;
   private Set<Map<String, Object>> hosts;
   private Set<Map<String, Object>> configVersions;
-  private Set<Map<String, Object>> versionTags =  new HashSet<Map<String, Object>>();
+  private Set<Map<String, Object>> versionTags = new HashSet<>();
 
   public ConfigGroupResponse(Long id, String clusterName,
           String groupName, String tag, String description,

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java
index f3c2ec8..e151e63 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java
@@ -539,8 +539,7 @@ public class ControllerModule extends AbstractModule {
 
       LOG.info("Searching package {} for annotations matching {}", AMBARI_PACKAGE, classes);
 
-      matchedClasses = ClasspathScannerUtils.findOnClassPath(AMBARI_PACKAGE,
-          new ArrayList<Class<?>>(), classes);
+      matchedClasses = ClasspathScannerUtils.findOnClassPath(AMBARI_PACKAGE, new ArrayList<>(), classes);
 
       if (null == matchedClasses || matchedClasses.size() == 0) {
         LOG.warn("No instances of {} found to register", classes);

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/controller/HostResponse.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/HostResponse.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/HostResponse.java
index 765d255..9d02a0b 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/HostResponse.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/HostResponse.java
@@ -176,10 +176,10 @@ public class HostResponse {
   public HostResponse(String hostname) {
     this(hostname, "", "",
       0, 0, "", "",
-      0, new ArrayList<DiskInfo>(),
-        0, 0, "",
-        new HashMap<String, String>(),
-        null, null, null, null);
+      0, new ArrayList<>(),
+      0, 0, "",
+      new HashMap<>(),
+      null, null, null, null);
   }
 
   @ApiModelProperty(name = HostResourceProvider.HOST_NAME_PROPERTY_ID)

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java
index 7b8f58d..6c6c439 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java
@@ -450,7 +450,7 @@ public class KerberosHelperImpl implements KerberosHelper {
 
     return (applyStackAdvisorUpdates)
         ? applyStackAdvisorUpdates(cluster, installedServices.keySet(), configurations, kerberosConfigurations, propertiesToIgnore,
-        new HashMap<String, Set<String>>(), kerberosEnabled)
+      new HashMap<>(), kerberosEnabled)
         : kerberosConfigurations;
   }
 
@@ -1140,7 +1140,7 @@ public class KerberosHelperImpl implements KerberosHelper {
       context.put("services", services);
 
       // Get the Kerberos identities that need to be pruned
-      Map<String, Set<String>> identitiesToRemove = processWhenClauses("", kerberosDescriptor, context, new HashMap<String, Set<String>>());
+      Map<String, Set<String>> identitiesToRemove = processWhenClauses("", kerberosDescriptor, context, new HashMap<>());
 
       // Prune off the Kerberos identities that need to be removed due to the evaluation of its _when_ clause
       for (Map.Entry<String, Set<String>> identity : identitiesToRemove.entrySet()) {
@@ -1945,7 +1945,7 @@ public class KerberosHelperImpl implements KerberosHelper {
       handler.createStages(cluster,
           clusterHostInfoJson, hostParamsJson, event, roleCommandOrder, kerberosDetails,
           dataDirectory, requestStageContainer, serviceComponentHostsToProcess,
-          Collections.<String, Collection<String>>emptyMap(), null, null, hostsWithValidKerberosClient);
+          Collections.emptyMap(), null, null, hostsWithValidKerberosClient);
 
 
       handler.addFinalizeOperationStage(cluster, clusterHostInfoJson, hostParamsJson, event,
@@ -3064,8 +3064,8 @@ public class KerberosHelperImpl implements KerberosHelper {
                 cluster.getClusterName(),
                 "DISABLE_SECURITY",
                 singletonList(new RequestResourceFilter(service.getName(), component.getName(), singletonList(firstHost))),
-                Collections.<String, String>emptyMap());
-              customCommandExecutionHelper.addExecutionCommandsToStage(exec, stage, Collections.<String, String>emptyMap(), null);
+                Collections.emptyMap());
+              customCommandExecutionHelper.addExecutionCommandsToStage(exec, stage, Collections.emptyMap(), null);
           }
         }
       }
@@ -3097,8 +3097,8 @@ public class KerberosHelperImpl implements KerberosHelper {
             cluster.getClusterName(),
             "STOP",
             singletonList(new RequestResourceFilter(zookeeper.getName(), component.getName(), new ArrayList<>(hosts))),
-            Collections.<String, String>emptyMap());
-          customCommandExecutionHelper.addExecutionCommandsToStage(exec, stage, Collections.<String, String>emptyMap(), null);
+            Collections.emptyMap());
+          customCommandExecutionHelper.addExecutionCommandsToStage(exec, stage, Collections.emptyMap(), null);
       }
       RoleGraph roleGraph = roleGraphFactory.createNew(roleCommandOrder);
       roleGraph.build(stage);

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/controller/LdapSyncRequest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/LdapSyncRequest.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/LdapSyncRequest.java
index c28e222..5180e3c 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/LdapSyncRequest.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/LdapSyncRequest.java
@@ -49,7 +49,7 @@ public class LdapSyncRequest {
    */
   public LdapSyncRequest(LdapSyncSpecEntity.SyncType type, Set<String> principalNames) {
     this.type  = type;
-    this.principalNames = principalNames == null ? new HashSet<String>() : principalNames;
+    this.principalNames = principalNames == null ? new HashSet<>() : principalNames;
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/ambari/blob/ab8d58ba/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractAuthorizedResourceProvider.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractAuthorizedResourceProvider.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractAuthorizedResourceProvider.java
index 32e59eb..a24c639 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractAuthorizedResourceProvider.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractAuthorizedResourceProvider.java
@@ -543,7 +543,7 @@ public abstract class AbstractAuthorizedResourceProvider extends AbstractResourc
    */
   private Set<RoleAuthorization> createUnmodifiableSet(Set<RoleAuthorization> set) {
     return (set == null)
-        ? Collections.<RoleAuthorization>emptySet()
+        ? Collections.emptySet()
         : Collections.unmodifiableSet(new HashSet<>(set));
   }
 }


Mime
View raw message