I agree, i noticed this issue last month and suggested a patch :

http://www.mail-archive.com/[EMAIL PROTECTED]/msg33704.html

Basically it adds a setSplitString(boolean) method in the AbstractConfiguration class that enable or disable property splitting.

Emmanuel Bourg


Stephane Bailliez wrote:


Following a private email with Eric.

There is an underlying problem in configuration regarding the handling of
comma delimited properties.
As of now, a comma delimited string is considered a list of values, so
something like:

java.naming.provider.url=ldap://server:390/ou=something,o=else,c=here

will return a list made of { 'ldap://server:390/ou=something' , 'o=else',
'c=here' } when doing a getProperty() and a getString() will return the
first element on the list.

Hardly a convenience to initialize an ldap/jndi connection.

I made a couple of suggestions (some were very stupids actually like a
contract with the toString method on the object) , and Eric suggested a
decorator or a subclass.

I'm not sure that the decorator/subclass would be appropriate as it would
probably mean yet another decoration/subclass which might interfere with the
fact that we may want this behavior in just every configuration class. Let's
face it, we may want to handle list and non list in the same configuration
subset

I think that the best thing to do is to enforce that the getString() method
should return whatever property as its original value.

Thoughts ?

Stephane




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


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



Reply via email to