The BaseIteratingStage has functionality based around the idea that subclasses will return a boolean saying whether the Item being processed should be retained or removed from the collection. In the vast majority of cases, however, this functionality is not required by the subclass which just wants to iterate rather than filter, and both the base class and the subclass end up doing more work and being more complicated.
This should be resolved by refactoring:
- rename BaseIteratingStage to BaseFilteringStage
- change all subclasses to track that name change
- create a new BaseIteratingStage which just iterates, and whose abstract doExecute has a simpler signature
- change appropriate (non-filtering) subclasses to derive from the new class, and simplify their implentation appropriately