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) PropertyConfiguration.getProperty() does not inherit property value
Date Fri, 27 Apr 2007 08:57:17 GMT
Hi,

This is indeed the expected behavior, getProperty() returns the raw 
value, and getString() performs the interpolation.

Emmanuel Bourg


Giriraj Vengurleker a écrit :
> I have a property file with an entry
> 
> INCA_BASE_DIR = C:\\Test1
> 
> And another property file which has
> 
> include=base.properties
> OUTPUT_DIR=${INCA_BASE_DIR}\\DERIVED
> 
> If I use the following code then the property does not get substituted:
> 
> Configuration config = new PropertiesConfiguration(dprops);
> System.err.println ("Property Value as read in the Java applicatiion is : "
> + (String)config.getProperty("OUTPUT_DIR") );
> 	
> If I use config.getString() then it gives me the property with the
> INCA_BASE_DIR substituted correctly.
> 
> Is this an expected behavior?
> 
> 
> Thanks

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