commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Bourg <>
Subject Re: [configuration] comma delimited properties
Date Wed, 25 Feb 2004 13:37:44 GMT
I wonder if we shouldn't even deprecate or remove the use of multiple 
properties on a single line. Currently we only support arrays for 
strings, but sooner or later I think we will add arrays for all the 
types supported (getIntArray, getByteArray, etc), and if we keep the 
property splitting, we will have to find a separator that works with all 
types simultaneously.

"," : conflicts with the grouping separator of a decimal format if we 
add a Configuration.getNumberFormat() method in the future.

":" : conflicts with URLs syntax if we add a Configuration.getURL() method.

";" : conflict with the DecimalFormat syntax. It may also be used in URLs.

"|" : maybe a good candidate for a default separator, until we want to 
add a basic type using it.

imho the multiple lines syntax is cleaner and easier to handle.

Emmanuel Bourg

Eric Pugh wrote:

> To be honest..  I think at some point we may be forced to do this in
> PropertiesConfiguration.(post 1.0!):
> 1) If you want to do this: ldap.someproperty=this,is,a,real,list,of,values
> then you do this:
> ldap.someproperty=this
> ldap.someproperty=is
> ldap.someproperty=a
> ldap.someproperty=real
> ldap.someproperty=list
> ldap.someproperty=of
> ldap.someproperty=values
> 2) setPropertyDelimator(";")
> ldap.someproperty=this;is;a;real;list;of;values
> In fact, maybe option 2 isn't so bad?  I mean, eventually you are going to
> have to make a decision, are ","'s a delimiter or not..  And why should it
> only be "," characters?  Would someone like to send in a patch and unit test
> for setStringSplitting and setListDelimiter?
> Eric
>>-----Original Message-----
>>From: news []On Behalf Of Stephane Bailliez
>>Sent: Wednesday, February 25, 2004 1:32 PM
>>Subject: Re: [configuration] comma delimited properties
>>"Emmanuel Bourg" <> wrote in message
>>>I agree, i noticed this issue last month and suggested a patch :
>>>Basically it adds a setSplitString(boolean) method in the
>>>AbstractConfiguration class that enable or disable property
>>Yes. Thought about that too, but I was wondering if it was
>>really judicious
>>to start adding such kind of methods here.
>>Plus it does not really solve the problem at all because we
>>can have various
>>properties in the same subset that may need to be handled
>>differently and
>>I'm not sure it is the way to go to do
>>isSplitString()/setSplitString() in
>>retrieving properties. Think about this:
>>To unsubscribe, e-mail:
>>For additional commands, e-mail:
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message