Skip to content

Let fluent setters of SimpleStepBuilder return proper type - #3989

Closed
hpoettker wants to merge 3 commits into
spring-projects:mainfrom
hpoettker:listener
Closed

hpoettker wants to merge 3 commits into
spring-projects:mainfrom
hpoettker:listener

Conversation

@hpoettker

Copy link
Copy Markdown
Contributor

Let fluent setters of SimpleStepBuilder return this with type SimpleStepBuilder. This makes the required order of some fluent setters a bit more lenient and prevents that AbstractTaskletStepBuilder::listener for parameters of type Object is invoked although an overloaded method specific for SimpleStepBuilder is intended.

Fixes #773 and #1098.

@hpoettker

Copy link
Copy Markdown
Contributor Author

I rebased the original commit on the current main branch.

I also added a commit that is functionally the same but uses less unchecked casts. It's a bit cleaner but also a bit noisier as it touches more classes.

@SebastianGoeb

Copy link
Copy Markdown

Is this PR still active? I've also encountered the listener issue #773 , and would love to see this change merged.

@hpoettker

Copy link
Copy Markdown
Contributor Author

From my side, I'd definitely consider this PR active. If it needs work, I'll be happy to do it.

The listener method on the DSL can be confusing. And I think this PR would really help in this regard.

@hpoettker

Copy link
Copy Markdown
Contributor Author

I fixed the merge conflict that arised mainly from #4118 for the main branch.

There are now at least three open issues that are addressed by this PR: #773, #1098, and #3686. And I'd also consider it as having votes from the community.

It would be great to have a target release assigned to this.

@fmbenhassine fmbenhassine added this to the 5.0.0-M4 milestone Jun 7, 2022
@fmbenhassine

Copy link
Copy Markdown
Contributor

Rebased, squashed and merged as d280556. Thank you for your contribution!

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ItemReadListener not being correctly registered after adding a StepExecutionListener

3 participants