Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Documentation: FaultTolerantStepBuilder#skipLimit Javadoc is misleading with custom skipPolicy #4963

Open
@limcpf

Description

The Javadoc for FaultTolerantStepBuilder#skipLimit(int) in Spring Batch 5.1.0 currently says:

Sets the maximum number of failed items to skip before the step fails. Ignored if an explicit skipPolicy(SkipPolicy) is provided. 
(Identical wording appears in the attached API PDF we consulted.)

This wording can be misread as: "skipLimit is always irrelevant whenever a custom SkipPolicy is set."
A clearer description is that skipLimit participates only when the default, limit-based skip policy is in effect; once a custom SkipPolicy is provided, that default policy is not used, so the configured skipLimit will no longer have any effect.

This aligns with how Spring Batch models skip behavior: there is a built-in limit-checking skip policy (LimitCheckingItemSkipPolicy) used to enforce the max number of skips; when users install their own SkipPolicy, that default policy is not applied. See the API docs for LimitCheckingItemSkipPolicy (describes the limit-based behavior).  

Why this matters

Developers reading "Ignored if... provided" often wonder whether their configured skipLimit is silently dropped (vs. simply not applicable because the default policy is replaced). Clarifying the wording avoids confusion when migrating from skipLimit/skip(...) to a custom SkipPolicy.

Suggested doc tweak

Update the Javadoc of skipLimit(int) to something along the lines of:

Sets the maximum number of failed items to skip before the step fails. Effective only when the default limit-based skip policy is used. If a custom SkipPolicy is provided via skipPolicy(SkipPolicy), this limit does not apply.

Optionally, add a short note in skipPolicy(SkipPolicy) pointing out that installing a custom policy replaces the default limit-checking behavior.

References
• Spring Batch 5.1.0 API — FaultTolerantStepBuilder#skipLimit: wording that says "Ignored if an explicit skipPolicy(SkipPolicy) is provided." 
• Same page from the 5.1.0 API PDF (attached in this report): identical wording.
• LimitCheckingItemSkipPolicy — documents the default limit-checking skip behavior.

Tahnks!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /