Browse Source

Fix manipulating property sources example in Javadoc for ConfigurableEnvironment

The "manipulating property sources" example in the Javadoc for
`ConfigurableEnvironment` states that `MutablePropertySources`
expect a `Map<String,String>`; whereas it expects a
`Map<String,Object>`.

Closes gh-29693
pull/29698/head
Carlos Belizón 3 years ago committed by GitHub
parent
commit
5d2ca11315
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      spring-core/src/main/java/org/springframework/core/env/ConfigurableEnvironment.java

2
spring-core/src/main/java/org/springframework/core/env/ConfigurableEnvironment.java vendored

@ -37,7 +37,7 @@ import java.util.Map; @@ -37,7 +37,7 @@ import java.util.Map;
* <pre class="code">
* ConfigurableEnvironment environment = new StandardEnvironment();
* MutablePropertySources propertySources = environment.getPropertySources();
* Map&lt;String, String&gt; myMap = new HashMap&lt;&gt;();
* Map&lt;String, Object&gt; myMap = new HashMap&lt;&gt;();
* myMap.put("xyz", "myValue");
* propertySources.addFirst(new MapPropertySource("MY_MAP", myMap));
* </pre>

Loading…
Cancel
Save