commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörg Schaible <>
Subject [Configuration] Issue with subset and substitution
Date Mon, 29 Mar 2004 16:55:57 GMT
Hello folks,

today I've build a SNAPSHOT version of configurations and with the new subsets I got a failed
unit test in my own application. I've boiled it down to something in commons-configuration
that worked before the subset refactoring:

     * Tests subsets and still can resolve elements
    public void testSubsetCanResolve() throws Exception
        cc = new CompositeConfiguration();
        final BaseConfiguration config = new BaseConfiguration();
        config.addProperty("subset.tempfile", "${}/file.tmp");

        Configuration subset = cc.subset("subset");
        assertEquals(System.getProperty("") + "/file.tmp", subset.getString("tempfile"));

If you have a closer look, it is quite obvious, why it does not work, since "subset" will
mask now anything including the system properties. It seems that the values were resolved
first in the previous version ...



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

View raw message