Skip to content

Commit

Permalink
Merge pull request #686 from andreaTP/fix-playframework-10206
Browse files Browse the repository at this point in the history
Fix: Avoid loading all the environment variables as configurations
  • Loading branch information
havocp authored Jun 24, 2020
2 parents 44f21c3 + 379a1f0 commit e0984d4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ public static void reloadEnvVariablesConfig() {

private static AbstractConfigObject loadEnvVariablesOverrides() {
Map<String, String> env = new HashMap(System.getenv());
Map<String, String> result = new HashMap(System.getenv());
Map<String, String> result = new HashMap();

for (String key : env.keySet()) {
if (key.startsWith(ENV_VAR_OVERRIDE_PREFIX)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1135,6 +1135,10 @@ class ConfigTest extends TestUtils {
assertEquals(3, conf02.getInt("a-c"))
assertEquals(4, conf02.getInt("a_c"))

intercept[ConfigException.Missing] {
conf02.getInt("CONFIG_FORCE_a_b_c")
}

assertEquals("foo", conf04.getString("akka.version"))
assertEquals(10, conf04.getInt("akka.event-handler-dispatcher.max-pool-size"))
} finally {
Expand Down

0 comments on commit e0984d4

Please sign in to comment.