Skip to content

Javadoc inaccuracy in SpringApplicationBuilder.properties(Properties) #22962

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

Closed
mjustin opened this issue Aug 14, 2020 · 1 comment
Closed

Javadoc inaccuracy in SpringApplicationBuilder.properties(Properties) #22962

mjustin opened this issue Aug 14, 2020 · 1 comment
Labels
type: documentation A documentation update
Milestone

Comments

@mjustin
Copy link

mjustin commented Aug 14, 2020

The method Javadocs for SpringApplicationBuilder.properties(Properties) are a bit inaccurate, due to an apparent copy/paste from SpringApplicationBuilder.properties(String... defaultProperties). This is the case in the latest 2.3.1, and has been for quite some time.

	/**
	 * Default properties for the environment in the form {@code key=value} or
	 * {@code key:value}.
	 * @param defaultProperties the properties to set.
	 * @return the current builder
	 */
	public SpringApplicationBuilder properties(Properties defaultProperties) {
		return properties(getMapFromProperties(defaultProperties));
	}

Since this is a Properties object, it uses the standard key/value map structure of that object type, and not the formatted key=value or key:value strings mentioned in the doc comment.

Presumably, it could have the same doc comment as the SpringApplicationBuilder.properties(Map<String, Object> defaults) version:

Default properties for the environment. Multiple calls to this method are cumulative.

On that note, I notice an inconsistency in the Javadocs between the three properties methods. "Multiple calls to this method are cumulative." is applicable to all three, but is only called out in the Map<String, Object> version.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Aug 14, 2020
@philwebb philwebb added type: documentation A documentation update and removed status: waiting-for-triage An issue we've not yet triaged labels Aug 14, 2020
@philwebb philwebb added this to the 2.2.x milestone Aug 14, 2020
@philwebb philwebb modified the milestones: 2.2.x, 2.2.10 Aug 15, 2020
@philwebb
Copy link
Member

Thanks for the report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: documentation A documentation update
Projects
None yet
Development

No branches or pull requests

3 participants