An unexpected error occurs with the following code:
// This FAILS!
Config conf = ConfigFactory.parseString("{ \"one\": \"first\", \"one\": ${variable}}")
.resolveWith(ConfigFactory.parseString("{ \"variable\": \"second\"}"));
The expected behavior is that the value of "one" will be ${variable}, which will resolve to "second". Instead, the following exception is thrown:
com.typesafe.config.ConfigException$BugOrBroken: replace in parent not possible ConfigDelayedMerge("first",${variable}) with Quoted("first") in ResolveSource(root=SimpleConfigObject({"variable":"second"}), pathFromRoot=null)
The following code blocks work as expected, so this is definitely an edge case that involves both an overloaded value AND resolving against another config:
// This works
Config conf = ConfigFactory.parseString("{ \"one\": \"first\", \"one\": ${variable}, \"variable\": \"second\"}")
.resolve();
// This works
Config conf = ConfigFactory.parseString("{ \"one\": ${variable}}")
.resolveWith(ConfigFactory.parseString("{ \"variable\": \"second\"}"));
Bug is observed running with artifact com.typesafe:config:1.4.9.
An unexpected error occurs with the following code:
The expected behavior is that the value of "one" will be ${variable}, which will resolve to "second". Instead, the following exception is thrown:
The following code blocks work as expected, so this is definitely an edge case that involves both an overloaded value AND resolving against another config:
Bug is observed running with artifact
com.typesafe:config:1.4.9.