"Nathan Bubna" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
> Thilo said:
> ...
> > By the way, there was this nasty whitespace problem in
velocity.properties
> > where the values in "aProperty = aValue " and "aProperty = aValue" are
> > interpreted as different values.
> > It is probably just a propertyValue.trim() that is needed. Could you
> > possibly also look after that?
>
> if there is such a problem (i'm not sure what you're describing, and my
eyes
> can't see any difference between the two strings you've typed above),

It is the extra trailing " " (space). Hard to see, even with "" as visual
helpers, isn't it? But imagine finding this extra  within a properties file.
*g*

> then
> the best place to take it up would probably be commons-collections, since
> Velocity (or the VelocityViewServlet at least) uses their
ExtendedProperties
> class to handle velocity.properties.

This is right, but not the whole truth. ;-)

When you look at VelocityServlet#loadConfiguration(ServletConfig config)
then you will see the following handling:

Properties p = new Properties();
[...]
p.load( new FileInputStream(propsFile) );

ExtendedProperties' PropertiesReader takes care of trimming, but
java.util.Properties doesn't. Neither does the
ExtendedProperties#convertProperties-Method, which is used in
RuntimeInstance.

This is interesting, because it means that files interpreted by
java.util.Properties always show this (in my view undesirable) semantics.

> <quickly slips hand free/> :-)

;-)

Bye,
Thilo.






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

Reply via email to