I would like to use an alternate list delimiter in Apache Commons Configuration. However, despite trying a great many different ways of accessing a Configuration object and setting its list delimiter, I can never get it to actually use anything other than the default comma delimiter.
I'm using Commons Configuration version 1.8.0 with Java 1.6.0_29 on Mac OS X.
EDIT:
I need to load an XML configuration definition file that establishes a four-tier set of configuration sources:
<configuration>
<system/>
<properties fileName="top.properties"/>
<properties fileName="bop.properties"/>
<properties fileName="fop.properties"/>
</configuration>
... which I supply to the DefaultConfigurationBuilder
constructor:
val configBuilder = new DefaultConfigurationBuilder(configURL)
I've tried both overloads of getConfiguration
on the resulting DefaultConfigurationBuilder
. The zero-arg version is declared to return Configuration
, not a sub-class of AbstractConfiguration
(though it can be cast to AbstractConfiguration
) and Configuration
does not even define setListDelimiter
.
Can you clarify how, given these requirements, I can get control over the list delimiter?
FOLLOW-UP:
Calling AbstractConfiguration.setDefaultListDelimiter(listDelim)
solved the problem for me.
Randall Schulz