Source:
<code>public JobCoordinatorServiceImpl( @NotNull final JobPersistenceService jobPersistenceService, @NotNull final JobKillService jobKillService, @NotNull final JobStateService jobStateService, @NotNull final JobsProperties jobsProperties, @NotNull final ApplicationService applicationService, @NotNull final JobSearchService jobSearchService, @NotNull final ClusterService clusterService, @NotNull final CommandService commandService, @NotNull final ClusterLoadBalancer clusterLoadBalancer, @NotNull final Registry registry, @NotBlank final String hostName ) { this.jobPersistenceService = jobPersistenceService; this.jobKillService = jobKillService; this.jobStateService = jobStateService; this.applicationService = applicationService; this.jobSearchService = jobSearchService; this.clusterService = clusterService; this.commandService = commandService; this.clusterLoadBalancer = clusterLoadBalancer; this.jobsProperties = jobsProperties; this.hostName = hostName; this.commandStatuses = EnumSet.noneOf(CommandStatus.class); this.commandStatuses.add(CommandStatus.ACTIVE); this.coordinationTimer = registry.timer("genie.jobs.coordination.timer"); this.selectClusterTimer = registry.timer("genie.jobs.submit.localRunner.selectCluster.timer"); this.selectCommandTimer = registry.timer("genie.jobs.submit.localRunner.selectCommand.timer"); this.selectApplicationsTimer = registry.timer("genie.jobs.submit.localRunner.selectApplications.timer"); this.setJobEnvironmentTimer = registry.timer("genie.jobs.submit.localRunner.setJobEnvironment.timer"); if (this.jobsProperties.getUsers().isActiveJobsLimitEnabled()) { <START> final int activeJobsLimit = this.jobsProperties.getUsers().getActiveJobsLimit(); <END> if (activeJobsLimit <= 0) { throw new IllegalStateException( "User active job limit is enabled with an invalid value: " + activeJobsLimit + " (must be >= 1)" ); } } }</code><technical_language>check this time. able put @Size other validation in properties class. write setter in properties class force a quick fail property set invalid resets allowed. This checking constructor distributed this check in multiple places (not do could). centralized in data object itself</technical_language>

Target:
public JobCoordinatorServiceImpl( @NotNull final JobPersistenceService jobPersistenceService, @NotNull final JobKillService jobKillService, @NotNull final JobStateService jobStateService, @NotNull final JobsProperties jobsProperties, @NotNull final ApplicationService applicationService, @NotNull final JobSearchService jobSearchService, @NotNull final ClusterService clusterService, @NotNull final CommandService commandService, @NotNull final ClusterLoadBalancer clusterLoadBalancer, @NotNull final Registry registry, @NotBlank final String hostName ) { this.jobPersistenceService = jobPersistenceService; this.jobKillService = jobKillService; this.jobStateService = jobStateService; this.applicationService = applicationService; this.jobSearchService = jobSearchService; this.clusterService = clusterService; this.commandService = commandService; this.clusterLoadBalancer = clusterLoadBalancer; this.jobsProperties = jobsProperties; this.hostName = hostName; this.commandStatuses = EnumSet.noneOf(CommandStatus.class); this.commandStatuses.add(CommandStatus.ACTIVE); this.coordinationTimer = registry.timer("genie.jobs.coordination.timer"); this.selectClusterTimer = registry.timer("genie.jobs.submit.localRunner.selectCluster.timer"); this.selectCommandTimer = registry.timer("genie.jobs.submit.localRunner.selectCommand.timer"); this.selectApplicationsTimer = registry.timer("genie.jobs.submit.localRunner.selectApplications.timer"); this.setJobEnvironmentTimer = registry.timer("genie.jobs.submit.localRunner.setJobEnvironment.timer"); }