Skip to content

Incorrect Type of getter in Documentation for JobParameters GetDouble #4526

Closed
@dchung1997

Description

@dchung1997

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions