Sabine Schwanitz wrote:
Hi,

when I'm trying to disableListDelimiter in DefaultConfigurationBuilder, this is ignored. I just started working with apache.commons.configuration so maybe I did something wrong?

So far I declared in my config.xml
..
<properties filename="test.properties"/>
<properties filename="test_en_US.properties" config-at="en_US"/>
..

So far localization works fine using config-at and prepending the local prefix to the key.
But I do also have messages with the default List Delimiter: ','
I don't need any list delimiter in the application and would like to avoid future conflicts by setting a different delimiter.

Here my code:

public static Configuration getConfigurationFor(String filename){
 DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
 builder.setDelimiterParsingDisabled(true);
 builder.load("config.xml")
 return builder.getConfiguration();
}

I also tried already a few things like not to reload Configuration with "builder.getConfiguration(false)" or to setting the flag directyl to configuration.

How do i get this work without setting a different delimiter?

Thanks for help

Sabine,

setting the delimiter parsing disabled flag on the DefaultConfigurationBuilder does not affect the loaded configurations, but only the builder itself. You can disable this mode for the sub configurations in the configuration definition file for each single configuration, e.g.:

<properties filename="test.properties" delimiterParsingDisabled="true"/>

HTH
Oliver

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

Reply via email to