Yes, I see it now if I use configurationAt all my tests pass correctly, for
now I will use configurationAt

Question: why are there two different methods like this that seem to do
semantically the same thing? Whats the difference between them?

On 12/2/06, Oliver Heger <[EMAIL PROTECTED]> wrote:

Mark,

I can now reproduce the problem. In this code fragment you call subset()
rather than configurationAt(), and here interpolation fails. I have
created a bug report for this problem [1].

Thanks
Oliver

[1] https://issues.apache.org/jira/browse/CONFIGURATION-242

Mark Diggory wrote:
> Actually, your example works for me too, but my real case still doesn't
> heres more detail:
>
> my instatiation of Configuration looks more like this
>
> CombinedConfiguration configuration = new CombinedConfiguration();
>> configuration.addConfiguration(
>>                 new PropertiesConfiguration(new
>> File(configProperty).toURL())
>>             );
>>
>
> My properties file looks like this:
>
> # DSpace installation directory
>> dspace.dir = /dspace
>> # Example Apache HTTPD configuration
>> # config.template.apache13.conf = ${dspace.dir}/config/httpd.conf
>> config.template.log4j.properties = ${dspace.dir
}/config/log4j.properties
>> config.template.log4j-handle-plugin.properties = ${dspace.dir
>> }/config/log4j-handle-plugin.properties
>> config.template.oaicat.properties =
>> ${dspace.dir}/config/oaicat.properties
>>
>
> I then go on to do my test:
>
>
>>         System.out.println(configuration.getString("dspace.dir"));
>>         System.out.println(configuration.getString("
>> config.template.log4j.properties"));
>>         System.out.println(configuration.getString("
>> config.template.log4j-handle-plugin.properties"));
>>         System.out.println(configuration.getString("
>> config.template.oaicat.properties"));
>>
>>         Configuration subset = configuration.subset("config.template");
>>
>>         this.assertEquals(
>>                     configuration.getString("
>> config.template.log4j.properties"),
>>                     subset.getString("log4j.properties")
>>                     );
>>
>>         this.assertEquals(
>>                 configuration.getString("
>> config.template.log4j-handle-plugin.properties"),
>>                 subset.getString("log4j-handle-plugin.properties")
>>                 );
>>
>>         this.assertEquals(
>>
>> configuration.getString("config.template.oaicat.properties
>> "),
>>                 subset.getString("oaicat.properties")
>>                 );
>>
>>
>
> Thanks,
> Mark

<snip/>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to