Default behavior in SmartConfig was wrong. What it should be (and now is) is
when a value is requested but not present, the value is set and returned with
the default if given, or null is returned if no default is given.
This commit is contained in:
Jonathan Bernard
2011-12-05 22:18:26 -06:00
parent 1227d53a14
commit 2308280480
2 changed files with 4 additions and 4 deletions

View File

@ -45,11 +45,11 @@ public class SmartConfig {
def val = props[name]
if (val == null && defVal != null) {
if (val == null) {
log.trace("Doesn't exists, setting with given default")
val = defVal
this.setProperty(name, defVal)
if (defVal != null) { this.setProperty(name, defVal) }
} else {