BATCH-1582: remove restrictio non step execution aggregator
This commit is contained in:
@@ -45,8 +45,8 @@ public class DefaultStepExecutionAggregator implements StepExecutionAggregator {
|
||||
*/
|
||||
public void aggregate(StepExecution result, Collection<StepExecution> executions) {
|
||||
Assert.notNull(result, "To aggregate into a result it must be non-null.");
|
||||
if (executions == null || executions.isEmpty()) {
|
||||
throw new IllegalArgumentException("Cannot aggregate empty or null executions: " + executions);
|
||||
if (executions == null) {
|
||||
return;
|
||||
}
|
||||
for (StepExecution stepExecution : executions) {
|
||||
BatchStatus status = stepExecution.getStatus();
|
||||
|
||||
@@ -24,12 +24,12 @@ public class DefaultStepExecutionAggregatorTests {
|
||||
|
||||
private StepExecution stepExecution2 = jobExecution.createStepExecution("foo:2");
|
||||
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
@Test
|
||||
public void testAggregateEmpty() {
|
||||
aggregator.aggregate(result, Collections.<StepExecution> emptySet());
|
||||
}
|
||||
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
@Test
|
||||
public void testAggregateNull() {
|
||||
aggregator.aggregate(result, null);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user