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

Conflicting info in @AfterChunk/@BeforeChunk annotation javadoc to current implementation #4961

Open
Labels
Milestone
@makigumo

Description

Bug description
Javadocs for @AfterChunk/@BeforeChunk state Expected signature: void afterChunk(Chunk) or Expected signature: void beforeChunk(Chunk) respectively.

But actually doing so results in something like:

java.lang.IllegalArgumentException: The method [afterChunk] on target class [MyChunkListener] is incompatible with the signature [(ChunkContext)] expected for the annotation [AfterChunk]

Using a signature of e.g. void beforeChunk(ChunkContext) works.

Environment
Spring Batch 6.0.0-M2 used from Spring Boot 4.0.0-M2

Steps to reproduce
Sample Listener to reproduce issue.

public class MyChunkListener<I, O> {
 @BeforeChunk
 public void beforeChunk(final Chunk<I> chunk) {
 }
 @AfterChunk
 public void afterChunk(final Chunk<O> chunk) {
 }
}

Expected behavior
Documentation should match implementation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

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