Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Constructors with var args/Lists #686

Conversation

drumonii
Copy link
Contributor

Adds constructors that take a List or var args to classes that set a List field.

I did a rudimentary search through the code to find List<. So if I'm missing a class, I can easily add the appropriate constructors.

I can create an issue for this if needed. I found it to be fairly trivial since it's only constructor updates. Hence, I didn't update the @author. I did update the copyright year.

@hbourada
Copy link

hbourada commented Apr 30, 2019

I think is a good enhancement mostly when creating jobs with java configuration it can reduce code lines but we must generalize it for all items

@drumonii
Copy link
Contributor Author

@hbourada any particular classes you have in mind? I was keeping this PR's scope low with targeting core and support classes especially for, like you said, usefulness with java config.

For classes that have a setter for a List<T> field, create Constructors that take List<T> and var args of T.
@drumonii drumonii force-pushed the add-constructors-to-take-list-and-var-args branch from 3948b4b to 55f7992 Compare September 23, 2019 18:04
@fmbenhassine fmbenhassine added in: infrastructure status: waiting-for-triage Issues that we did not analyse yet labels Nov 9, 2020
@fmbenhassine fmbenhassine removed the status: waiting-for-triage Issues that we did not analyse yet label Jan 21, 2021
@fmbenhassine fmbenhassine added this to the 5.0.0 milestone Jan 21, 2021
fmbenhassine pushed a commit that referenced this pull request Mar 21, 2022
For classes that have a setter for a List<T> field,
create Constructors that take List<T> and var args of T.

Issue #686
@fmbenhassine
Copy link
Contributor

LGTM. Rebased and merged as 15e18e5. Thank you for your contribution!

@fmbenhassine fmbenhassine modified the milestones: 5.0.0, 5.0.0-M2 Mar 21, 2022
lcmarvin pushed a commit to lcmarvin/spring-batch that referenced this pull request Apr 16, 2022
For classes that have a setter for a List<T> field,
create Constructors that take List<T> and var args of T.

Issue spring-projects#686
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.

None yet

3 participants