commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörg Schaible <>
Subject RE: [Configuration] Property interpolation & subsets
Date Thu, 02 Dec 2004 14:51:58 GMT
Emmanuel Bourg wrote on Thursday, December 02, 2004 2:38 PM:

> Hello Jörg, good point I didn't think about this issue I'll
> investigate it. Translating the key in the interpolation method might
> be another solution, I'm not sure how to do this though.

Then you would have to parse the value also like the interpolateHelper for the keys and you
would still have to try both variants. So I would change from:

 SubsetConfiguration config = new SubsetConfiguration(parent, "");
 return config.interpolate(base);


 SubsetConfiguration config = new SubsetConfiguration(parent, "");
 String value = config.interpolate(base);
 return value.indexOf(START_TOKEN)>0 ? parent.interpolate(value) : value;

==> try the parent if there is still a variable left in the sting after the interpolation.
With this solution the variables from the subset have precedence and the fallback is available.


- Jörg

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message