private void refreshChildren() {
        final List<JobExecution> executions = new ArrayList<>();
        // Casting to (Supplier<List<JobInstance>>) is done here on purpose as a workaround for a bug in 1.8.0_45
        final List<JobInstance> instances = jobOperator.allowMissingJob((Supplier<List<JobInstance>>)() -> jobOperator.getJobInstances(jobName, 0, jobOperator.getJobInstanceCount(jobName))
                , Collections.emptyList());
        for (JobInstance instance : instances) {
            executions.addAll(jobOperator.getJobExecutions(instance));
        }
        children.clear();
        for (JobExecution execution : executions) {
            final String name = Long.toString(execution.getExecutionId());
            children.add(name);
        }
    }
private void refreshChildren() {
        final List<JobExecution> executions = new ArrayList<>();
        
        final List<JobInstance> instances = jobOperator.allowMissingJob((Supplier<List<JobInstance>>)() -> jobOperator.getJobInstances(jobName, 0, jobOperator.getJobInstanceCount(jobName))
                , Collections.emptyList());
        for (JobInstance instance : instances) {
            executions.addAll(jobOperator.getJobExecutions(instance));
        }
        children.clear();
        for (JobExecution execution : executions) {
            final String name = Long.toString(execution.getExecutionId());
            children.add(name);
        }
    }
private void refreshChildren ( ) { final List < JobExecution > executions = new ArrayList <> ( ) ; // Casting to (Supplier<List<JobInstance>>) is done here on purpose as a workaround for a bug in 1.8.0_45 final List < JobInstance > instances = jobOperator . allowMissingJob ( ( Supplier < List < JobInstance > > ) ( ) -> jobOperator . getJobInstances ( jobName , 0 , jobOperator . getJobInstanceCount ( jobName ) ) , Collections . emptyList ( ) ) ; for ( JobInstance instance : instances ) { executions . addAll ( jobOperator . getJobExecutions ( instance ) ) ; } children . clear ( ) ; for ( JobExecution execution : executions ) { final String name = Long . toString ( execution . getExecutionId ( ) ) ; children . add ( name ) ; } }
Note the access to the {@link #children} is <strong>not</strong> guarded here and needs to be externally
guarded.
Note the access to the {