diff --git a/config/src/main/java/com/typesafe/config/impl/ConfigImpl.java b/config/src/main/java/com/typesafe/config/impl/ConfigImpl.java index f14c12af6..9e580a40f 100644 --- a/config/src/main/java/com/typesafe/config/impl/ConfigImpl.java +++ b/config/src/main/java/com/typesafe/config/impl/ConfigImpl.java @@ -371,7 +371,7 @@ public static void reloadEnvVariablesConfig() { private static AbstractConfigObject loadEnvVariablesOverrides() { Map env = new HashMap(System.getenv()); - Map result = new HashMap(System.getenv()); + Map result = new HashMap(); for (String key : env.keySet()) { if (key.startsWith(ENV_VAR_OVERRIDE_PREFIX)) { diff --git a/config/src/test/scala/com/typesafe/config/impl/ConfigTest.scala b/config/src/test/scala/com/typesafe/config/impl/ConfigTest.scala index 604aaa644..b00a9adbf 100644 --- a/config/src/test/scala/com/typesafe/config/impl/ConfigTest.scala +++ b/config/src/test/scala/com/typesafe/config/impl/ConfigTest.scala @@ -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 {