commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oliver Heger <oliver.he...@oliver-heger.de>
Subject Re: commons-configuration
Date Fri, 22 Jun 2007 17:07:20 GMT
Hello Thomas,

Wabner, Thomas (EXT) wrote:
> Hi again,
> 
>  
> 
> one question to PropertiesConfiguration. I add any properties with the
> #addProperty() method to my PropertiesConfiguration and later I save the
> configuration. Now I'am wondering about the save-file because it
> contains the same key more than once. The documentation of the
> PropertiesConfiguration says:
> 
>  
> 
> f a key is used more than once, the values are appended like if they
> were on the same line separated with commas.
> 
>  
> 
> But this is not true. The save file looks like:
> 
>  
> 
> axis-saaj = 1.3
> 
> axis-saaj = 3.3.3
> 
>  
> 
> But should look like
> 
>  
> 
> axis-saaj = 1.3, 3.3.3
> 
>  
> 
> Is there is a bug in the implementation or in the documentation? Or if
> I'am currently wrong?
> 
>  
> 
> Regards,
> 
>  
> 
> - Thomas Wabner
> 
> 

it seems that the documentation is a bit out of date (will fix this 
soon). To force properties with multiple values to be written on a 
single line you have to call

config.getLayout().setForceSingleLine(true);

Have a look at the PropertiesConfigurationLayout class for more options.

Oliver

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message