Hi Lautaro,

Am 10.12.2010 13:26, schrieb Lautaro Brasseur:
I'm trying to use the CompositeConfiguration class:

http://commons.apache.org/configuration/userguide/howto_compositeconfiguration.html#Setting_Up_Defaults


but I didn't found the method a=dDefaults referenced in that page. Is there any
replacement?

Thanks in advance.

Lautaro


this example is wrong. The last line should run
cc.addConfiguration(fileToDefaults);

When asked for a property CompositeConfiguration searches all contained configuration objects in the order they were added. The first value found is returned. So you can achieve a defaults mechanism by simply adding the configuration with the default values as the last configuration: it is then queried if no other configuration object contains the property in question.

Oliver

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to