commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jonathan doklovic <>
Subject Commons Config Interpolation not working
Date Fri, 07 Mar 2008 17:56:13 GMT

I'm using commons-config-1.5
I have created a Configuration class that extends CombinedConfiguration
and I can't get property interpolation to work.

I decided to step back and just try a simple test case, and I can get
that to work either. Here's what I have:
client.prop=got ${base.prop}?
public void genericExpansion() throws Exception {
    File props = new File("");
    Configuration cfg = new PropertiesConfiguration(props);
    assert cfg.getProperty("client.prop").equals("got root?") :
"expected: got root? received: " + cfg.getProperty("client.prop");


Test output
genericExpansion - Failure - expected: got root? received: got

java.lang.AssertionError: expected: got root? received: got
... Removed 22 stack frames

Why is this test failing?

- Jonathan

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

View raw message