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 committed 2011-12-05 22:18:26 -06:00
1 parent 1227d53a14
commit 2308280480
2 files changed
+4 -4

No files matched your search

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