Skip to content

Commit

Permalink
Fix and improve SpringApplicationBuilder javadoc
Browse files Browse the repository at this point in the history
Update SpringApplicationBuilder.properties method javadoc to fix
inaccuracies and apply more consistency.

Closes gh-22962
  • Loading branch information
philwebb committed Aug 15, 2020
1 parent 3e939cb commit 89a6f83
Showing 1 changed file with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -394,9 +394,12 @@ public SpringApplicationBuilder lazyInitialization(boolean lazyInitialization) {

/**
* Default properties for the environment in the form {@code key=value} or
* {@code key:value}.
* {@code key:value}. Multiple calls to this method are cumulative and will not clear
* any previously set properties.
* @param defaultProperties the properties to set.
* @return the current builder
* @see SpringApplicationBuilder#properties(Properties)
* @see SpringApplicationBuilder#properties(Map)
*/
public SpringApplicationBuilder properties(String... defaultProperties) {
return properties(getMapFromKeyValuePairs(defaultProperties));
Expand Down Expand Up @@ -425,10 +428,12 @@ private int lowestIndexOf(String property, String... candidates) {
}

/**
* Default properties for the environment in the form {@code key=value} or
* {@code key:value}.
* Default properties for the environment.Multiple calls to this method are cumulative
* and will not clear any previously set properties.
* @param defaultProperties the properties to set.
* @return the current builder
* @see SpringApplicationBuilder#properties(String...)
* @see SpringApplicationBuilder#properties(Map)
*/
public SpringApplicationBuilder properties(Properties defaultProperties) {
return properties(getMapFromProperties(defaultProperties));
Expand All @@ -444,10 +449,11 @@ private Map<String, Object> getMapFromProperties(Properties properties) {

/**
* Default properties for the environment. Multiple calls to this method are
* cumulative.
* cumulative and will not clear any previously set properties.
* @param defaults the default properties
* @return the current builder
* @see SpringApplicationBuilder#properties(String...)
* @see SpringApplicationBuilder#properties(Properties)
*/
public SpringApplicationBuilder properties(Map<String, Object> defaults) {
this.defaultProperties.putAll(defaults);
Expand Down

0 comments on commit 89a6f83

Please sign in to comment.