Bugfix.
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:
parent
1227d53a14
commit
2308280480
@ -1,6 +1,6 @@
|
||||
#Mon, 05 Dec 2011 22:11:12 -0600
|
||||
#Mon, 05 Dec 2011 22:17:22 -0600
|
||||
name=jdb-util
|
||||
version=1.4
|
||||
lib.local=true
|
||||
|
||||
build.number=8
|
||||
build.number=9
|
||||
|
@ -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 {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user