Skip to content

Generic SkipListener in ChunkOrientedStepBuilder #5412

Closed

Description

@acktsap

Bug description

Follow-up to #5358. ChunkOrientedStepBuilder.skipListener(SkipListener<I, O>) and ChunkOrientedStep.registerSkipListener(SkipListener<I, O>) are invariant, while deprecated FaultTolerantStepBuilder.listener(SkipListener<? super I, ? super O>) accepts contravariant listeners. CompositeSkipListener.register already takes the wildcard.

Environment

Spring Batch 6.0.3, Java 21.

Steps to reproduce

SkipListener<Object, Object> universal = ...;
new ChunkOrientedStepBuilder<Foo, Bar>(jobRepository, 10)
    .skipListener(universal); // compile error

Expected behavior

Both public APIs accept SkipListener<? super I, ? super O>, mirroring the #5358 fix.

Activity

  1. added
    status: waiting-for-triage
    on Jun 2, 2026
  2. added and removed
    status: waiting-for-triage
    on Jun 2, 2026
  3. added this to the 6.0.4 milestone on Jun 2, 2026
  4. fmbenhassine commented on Jun 2, 2026

    @fmbenhassine
    Contributor

    Resolved with #5413

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions