mirror of
https://github.com/lightbend/config.git
synced 2025-01-15 23:01:05 +08:00
fix simple-lib to call checkValid() specifying a path.
This commit is contained in:
parent
cfb4887d50
commit
130544f98a
@ -6,8 +6,11 @@ import com.typesafe.config._
|
||||
class SimpleLibContext(config: Config) {
|
||||
|
||||
// This verifies that the Config is sane and has our
|
||||
// reference config.
|
||||
config.checkValid(ConfigFactory.defaultReference())
|
||||
// reference config. Importantly, we specify the "simple-lib"
|
||||
// path so we only validate settings that belong to our this
|
||||
// library. Otherwise, we might throw mistaken errors about
|
||||
// settings we know nothing about.
|
||||
config.checkValid(ConfigFactory.defaultReference(), "simple-lib")
|
||||
|
||||
// This uses the standard default Config, if none is provided,
|
||||
// which simplifies apps willing to use the defaults
|
||||
|
Loading…
Reference in New Issue
Block a user