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
This commit is contained in:
Carlos Belizón
2022-12-16 13:47:40 +01:00
committed by GitHub
parent 858394b720
commit 5d2ca11315

View File

@@ -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>