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

Incorrect Type of getter in Documentation for JobParameters GetDouble #4526

Closed
dchung1997 opened this issue Dec 29, 2023 · 0 comments
Closed
Labels
for: backport-to-5.0.x Issues that will be back-ported to the 5.0.x line for: backport-to-5.1.x Issues that will be back-ported to the 5.1.x line in: documentation type: bug
Milestone

Comments

@dchung1997
Copy link

Hi I was looking through the Spring Batch API for the Class JobParameters. In the documentation I noticed there was a slight error in the description for getDouble(String key) in which the Description states.

Typesafe getter for the Long represented by the provided key.

I looked into it a bit and saw that it has to do with a comment in the class JobParameters.

https://github.com/spring-projects/spring-batch/blob/main/spring-batch-core/src/main/java/org/springframework/batch/core/JobParameters.java

In which the following comment is made.

	/**
	 * Typesafe getter for the {@link Long} represented by the provided key.
	 * @param key The key for which to get a value.
	 * @return The {@link Double} value or {@code null} if the key is absent.
	 */

The getDouble(String key, @nullable Double defaultValue) seems to have it set to double which looking at the code I think is because of a spelling error.

	/**
	 * Typesafe getter for the {@link Double} represented by the provided key. If the key
	 * does not exist, the default value is returned.
	 * @param key The key for which to return the value.
	 * @param defaultValue The default value to return if the value does not exist.
	 * @return the parameter represented by the provided key or, if that is missing, the
	 * default value.
	 */

I'm not sure if this is a big priority for you guys but I thought this could help.

@dchung1997 dchung1997 added status: waiting-for-triage Issues that we did not analyse yet type: bug labels Dec 29, 2023
@fmbenhassine fmbenhassine added in: documentation for: backport-to-5.0.x Issues that will be back-ported to the 5.0.x line for: backport-to-5.1.x Issues that will be back-ported to the 5.1.x line and removed status: waiting-for-triage Issues that we did not analyse yet labels Feb 12, 2024
@fmbenhassine fmbenhassine added this to the 5.2.0 milestone Feb 12, 2024
This was referenced Feb 12, 2024
@fmbenhassine fmbenhassine modified the milestones: 5.2.0, 5.2.0-M1 Sep 16, 2024
FBibonne pushed a commit to FBibonne/spring-batch that referenced this issue Feb 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
for: backport-to-5.0.x Issues that will be back-ported to the 5.0.x line for: backport-to-5.1.x Issues that will be back-ported to the 5.1.x line in: documentation type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants