What happens if you look for a config key in a groovy.util.ConfigObject and it does not exist?
It should return null or an empty map. The latter is true.
But the curious thing is that the key is created if it does not exist! It seems pretty odd and useless, but they must have a reason...
Here is the code that does that in this class:
public Object getProperty(String name) {
if ("configFile".equals(name))
return this.configFile;
if (!containsKey(name)) {
ConfigObject prop = new ConfigObject(this.configFile);
put(name, prop);
return prop;
}
return get(name);
}