Skip to content

Commit b980c7a

Browse files
committed
Add method to increment filter count by 1 in StepContribution
1 parent c7aabeb commit b980c7a

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

spring-batch-core/src/main/java/org/springframework/batch/core/step/StepContribution.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,15 @@ public ExitStatus getExitStatus() {
7373
}
7474

7575
/**
76-
* Increment the counter for the number of items processed.
76+
* Increment the counter for the number of filtered items.
77+
* @since 6.0.0
78+
*/
79+
public void incrementFilterCount() {
80+
this.incrementFilterCount(1);
81+
}
82+
83+
/**
84+
* Increment the counter for the number of filtered items.
7785
* @param count The {@code long} amount to increment by.
7886
*/
7987
public void incrementFilterCount(long count) {

spring-batch-core/src/main/java/org/springframework/batch/core/step/item/ChunkOrientedStep.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ private Chunk<O> process(Chunk<I> chunk, StepContribution contribution) throws E
428428
O processedItem = doProcess(item);
429429
this.compositeItemProcessListener.afterProcess(item, processedItem);
430430
if (processedItem == null) {
431-
contribution.incrementFilterCount(1);
431+
contribution.incrementFilterCount();
432432
}
433433
else {
434434
processedChunk.add(processedItem);

0 commit comments

Comments
 (0)