We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1a0af61 commit 359978dCopy full SHA for 359978d
marklogic-data-hub/src/main/java/com/marklogic/spring/batch/hub/CollectorReader.java
@@ -1,5 +1,6 @@
1
package com.marklogic.spring.batch.hub;
2
3
+import java.util.ArrayList;
4
import java.util.List;
5
6
import org.springframework.batch.item.ExecutionContext;
@@ -26,7 +27,12 @@ public CollectorReader(Collector collector) {
26
27
28
@Override
29
public void open(ExecutionContext executionContext) throws ItemStreamException {
- this.results = collector.run();
30
+ if (collector != null) {
31
+ this.results = collector.run();
32
+ }
33
+ else {
34
+ this.results = new ArrayList<>();
35
36
}
37
38
0 commit comments