You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by um...@comcast.net on 2007/05/09 23:48:29 UTC
Configuration: getString() vs. getValue()
There was a recent exchange on this list pertaining to this which I have unfortunately misplaced.
If I have a composite configuration with the properties
my.service.ip=1.2.3.4
my.service.port=8080
my.service.protocol=http
my.actual.url=${my.service.protocol}://${my.service.ip}:${my.service.port}
then
MyCompositeConfiguration.getValue()
would yield the string "http://1.2.3.4:8080"
while
MyCompositeConfiguration.getString()
would yield the 'raw' string
${my.service.protocol}://${my.service.ip}:${my.service.port}
Correct? Or is it the other way around?
Thanks,
/U
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org
Re: Configuration: getString() vs. getValue()
Posted by Emmanuel Bourg <eb...@apache.org>.
getValue() doesn't exist, I guess you mean getProperty() ?
getString() does the interpolation, getProperty() doesn't (you get the
raw value)
Emmanuel Bourg
uma_rk@comcast.net a écrit :
> There was a recent exchange on this list pertaining to this which I have unfortunately misplaced.
>
> If I have a composite configuration with the properties
>
> my.service.ip=1.2.3.4
> my.service.port=8080
> my.service.protocol=http
> my.actual.url=${my.service.protocol}://${my.service.ip}:${my.service.port}
>
> then
>
> MyCompositeConfiguration.getValue()
>
> would yield the string "http://1.2.3.4:8080"
>
> while
>
> MyCompositeConfiguration.getString()
>
> would yield the 'raw' string
>
> ${my.service.protocol}://${my.service.ip}:${my.service.port}
>
> Correct? Or is it the other way around?
>
> Thanks,
>
> /U
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org