Skip to content

Commit 82bd3a2

Browse files
rla124fmbenhassine
authored andcommitted
Clarify Javadoc for skipLimit with custom SkipPolicy
Resolves #4963 Signed-off-by: Subin Kim <rla0010101@gmail.com>
1 parent 484aab4 commit 82bd3a2

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

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

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -312,10 +312,17 @@ public FaultTolerantStepBuilder<I, O> retryContextCache(RetryContextCache retryC
312312
}
313313

314314
/**
315-
* Sets the maximum number of failed items to skip before the step fails. Ignored if
316-
* an explicit {@link #skipPolicy(SkipPolicy)} is provided.
317-
* @param skipLimit the skip limit to set. Default is 10.
318-
* @return this for fluent chaining
315+
* Sets the maximum number of failed items to skip before the step fails. The default
316+
* value is 10.
317+
* <p>
318+
* This limit is enforced using the default
319+
* {@link org.springframework.batch.core.step.skip.LimitCheckingItemSkipPolicy}. If a
320+
* custom {@link SkipPolicy} is provided via {@link #skipPolicy(SkipPolicy)}, this
321+
* limit will not be enforced by the step directly, but it can be implemented to be
322+
* honored by the custom policy.
323+
* @param skipLimit the maximum number of failed items to skip.
324+
* @return this for fluent chaining.
325+
* @see SkipPolicy
319326
*/
320327
public FaultTolerantStepBuilder<I, O> skipLimit(int skipLimit) {
321328
this.skipLimit = skipLimit;
@@ -348,6 +355,9 @@ public FaultTolerantStepBuilder<I, O> skip(Class<? extends Throwable> type) {
348355
/**
349356
* Provide an explicit policy for managing skips. A skip policy determines which
350357
* exceptions are skippable and how many times.
358+
* <p>
359+
* Note that setting a custom policy overrides the default limit-checking behavior
360+
* configured via {@link #skipLimit(int)}.
351361
* @param skipPolicy the skip policy
352362
* @return this for fluent chaining
353363
*/

0 commit comments

Comments
 (0)