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

Add JobParametersBuilder.addJobParameter(String key, JobParameter parameter) [BATCH-1277] #2305

Closed
spring-issuemaster opened this issue Jun 3, 2009 · 2 comments

Comments

@spring-issuemaster
Copy link
Collaborator

@spring-issuemaster spring-issuemaster commented Jun 3, 2009

Ian Brandt opened BATCH-1277 and commented

Should you already have a JobParameter instance and are building a new JobParameters instance with the JobParametersBuilder, it would be convenient to have an addJobParameter(String key, JobParameter parameter) method.

Patch against 2.0.1.RELEASE with existing test case augmented for coverage attached.


Affects: 2.0.0

Attachments:

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster commented Sep 9, 2009

Lucas Ward commented

It seems more useful to me to add a addJobParameters that would copy an existing JobParameters to the builder. It seems like getting individual JobParameter objects wouldn't be more benificial than getting the actual value, other than you wouldn't have to know the type ahead of time. I can see a use case where an existing JobParameters is copied over, and one or more of the values is overwritten, which is possible with the builder, albeit a bit confusing because the methods are prepended with add* rather than set*.

@spring-issuemaster

This comment has been minimized.

Copy link
Collaborator Author

@spring-issuemaster spring-issuemaster commented Sep 12, 2009

Lucas Ward commented

I realized when I looked that the builder already has a constructor that takes existing JobParameters, and looking again at the Map JobParameters returns, I can see why adding another method that takes a JobParameter makes sense. I added the method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.