commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zsolt Koppany" <zkoppanyl...@intland.com>
Subject AW: How to get the entire string with Configuration.getString
Date Wed, 30 Mar 2005 12:07:23 GMT
Thank you Oliver,

unfortunately I cannot do that because we have to assure compatibility (with
the version where we didn't use commons-configuration), thus here is my
code:

List exprs = config.getList("scc[@task_expression]");
if (!exprs.isEmpty())
{
   sccTaskIdExpression = StringUtils.join(exprs.iterator(), ",").trim();
}

Is not nice but works.

Zsolt

> -----Ursprüngliche Nachricht-----
> Von: Oliver Heger [mailto:hegero@med.uni-marburg.de]
> Gesendet: Mittwoch, 30. März 2005 12:21
> An: Jakarta Commons Users List
> Betreff: Re: How to get the entire string with Configuration.getString
> 
> Oh, I forgot an important point: you can escape the delimiter using a
> backslash. So if your configuration file contains:
> 
> <scc task_expression="(^|\\s)#([1-9][0-9]{3\,})" />
> 
> the entire string should be returned.
> 
> Oliver
> 
> Oliver Heger wrote:
> > You have hit a known limitation: The configuration interprets the "," as
> > a property delimiter and inserts two values for this key. For more
> > details see here:
> >
> > http://issues.apache.org/bugzilla/show_bug.cgi?id=29716
> >
> > So config.getString("scc[@task_expression](0)") will return the first
> > part of the expression and config.getString("scc[@task_expression](1)")
> > the part behind the ",".
> >
> > Oliver
> >
> > Zsolt Koppany wrote:
> >
> >> Hi,
> >>
> >> Configuration (XmlConfiguration) getString returns
> >> "(^|\\s)#([1-9][0-9]{3" for config.getString("scc[@task_expression]").
> >> How can I get the entire
> >> String?
> >>
> >> <scc task_expression="(^|\\s)#([1-9][0-9]{3,})" />
> >>
> >> I use 1.1RC2.
> >>
> >> Zsolt
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> >> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: commons-user-help@jakarta.apache.org
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org



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