Skip to content

Commit

Permalink
Fix manipulating property sources example in Javadoc for Configurable…
Browse files Browse the repository at this point in the history
…Environment

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 spring-projectsgh-29693
  • Loading branch information
quim3ra authored and mdeinum committed Jun 29, 2023
1 parent 04f6219 commit bda3d21
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
* <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>
Expand Down

0 comments on commit bda3d21

Please sign in to comment.