> Sorry if I did not understand your problem correctly.

Thanks for the reply again, Oliver.  Your patience is much appreciated.
 
> Neither of the Configuration implementations so far support suppression
> of multiple property values. (Background is the assumption that if a
> user defines these values in a configuration file, he/she will probably
> later want to access them.)

My reasoning for wanting to disregard the additional values for properties
is that in my project, we are using a set of files to allow developers to
Override property values.  This allows us to check-in properties files into
our Source/Version Control system and override with a custom file that isn't
checked in.  E.g.  our single properties file is default.config:

include = gcm.extension.config
include = log4j.config
include = gcm.config

Both log4j.config and gcm.config are checked in to source control.  And we
look to them to provide default values (and comments) for each configuration
property.

However, gcm.extension.config is not checked in.  That allows developers or
installations on various machines to alert the configuration just for that
install.

The fact that gcm.extension.config is not checked in allows us to commit our
configuration directory changes without worrying about overriding anyone
else's configuration.

This approach allows us to share a configuration by checking in and
overriding without the risk of affecting others.

> But if you only want the first value, can't you simply use one of the
> simple getter methods like getString(), getInt() etc.? These methods can
> be used on properties with multiple values, too. They then return only
> the first value. This also works with interpolation.

Yes I tried that when I explicitly ask for a configuration value.  However,
when the AbstractFileConfiguration (I think it's that class) performs the
substitution, it uses the entire multi-value of the property.  That
algorithm from what I can tell is not under my control, unless I change the
commons-configuration source code of course.

> Maybe I still don't understand your use case fully.

I hope I've done a better job describing it this time.  Thanks again!

Moran


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to