Merge pull request #686 from andreaTP/fix-playframework-10206

Fix: Avoid loading all the environment variables as configurations
This commit is contained in:
Havoc Pennington 2020-06-24 10:59:25 -04:00 committed by GitHub
commit e0984d41b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -371,7 +371,7 @@ public class ConfigImpl {
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)) {

View File

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