commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Bourg <ebo...@apache.org>
Subject Re: Configuration: getString() vs. getValue()
Date Thu, 10 May 2007 10:54:12 GMT
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


Mime
View raw message