In the meantime, I could track down what happend:
I set AbstractConfiguration.setDelimiter('0') as mentioned
in the Java Doc, not realizing that this would set the 
delimiter to char 0 (zero). 
Check the documentation at
http://jakarta.apache.org/commons/configuration/apidocs/index.html.

== Snippet from java doc:
value can contain value delimiters and will then be interpreted as a
list of tokens. Default value delimiter is the comma ','. So the
following property definition

  key = This property, has multiple, values
 

will result in a property with three values. You can change the value
delimiter using the AbstractConfiguration.setListDelimiter(char) method.
Setting the delimiter to 0 will disable value splitting completely.
== Snippet end.


I had to do that because I migrated from java.util.Properties 
and had already a mechanism in place that filled lists into 
ArrayLists. 

When I set the delimiting character to ^H, I had what I wanted.

I'm currently using Commons Configuraion 1.2.

Beat



-----Original Message-----
From: Oliver Heger [mailto:[EMAIL PROTECTED] 
Sent: Dienstag, 18. Juli 2006 22:10
To: Jakarta Commons Users List
Subject: Re: [configuration] Unexpected value returned from getString()
when FileProperty contains "<\d+>

[EMAIL PROTECTED] wrote:
> If I'm using ConfigurationFactory and getString() to retrieve a 
> property that was set to:
> 
> test = Hello<kk>
> 
> getString() returns as expected: "Hello<kk>"
> 
> 
> when I set the property to
> 
> test = Hello<10>
> 
> getString() returns: "Hello<1"
> 
> Why?
> 
> Beat
> 
Strange! Could you please provide a complete test program (better yet a
unit test), so that we can reproduce the problem? Which version of
Commons Configuration do you use?

Thanks.
Oliver

---------------------------------------------------------------------
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