commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aniruddh Chitre (JIRA)" <j...@apache.org>
Subject [jira] Updated: (CONFIGURATION-420) OverrideCombiner seems to ignore list nodes
Date Tue, 08 Jun 2010 12:24:11 GMT

     [ https://issues.apache.org/jira/browse/CONFIGURATION-420?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Aniruddh Chitre updated CONFIGURATION-420:
------------------------------------------

    Description: 
When using OverrideCombiner it seems to ignore any list nodes and always return properties/values
for list node from the overridden file. See the attached files for an example of what I mean.
The following code always returns the values from config-custom even if list-nodes mentions
that the sysprops node is a list-node.

		URL fileURL = TestConfig.class.getResource("config-conf.xml");
		
		try
		{
			DefaultConfigurationBuilder configBuilder = new DefaultConfigurationBuilder(fileURL);
			CombinedConfiguration config = configBuilder.getConfiguration(true);
			System.out.println(config.getString("sysprops/testkey"));
			System.out.println(config.getString("configprops/testkey1"));
		}
		catch (ConfigurationException e)
		{
			e.printStackTrace();
		}


  was:
When using OverrideCombiner it seems to ignore any list nodes and always return properties/values
for list node from the overridden file.




> OverrideCombiner seems to ignore list nodes
> -------------------------------------------
>
>                 Key: CONFIGURATION-420
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-420
>             Project: Commons Configuration
>          Issue Type: Bug
>          Components: Interpolation
>    Affects Versions: 1.6
>            Reporter: Aniruddh Chitre
>            Priority: Minor
>         Attachments: config-conf.xml, config-custom.xml, config.xml
>
>
> When using OverrideCombiner it seems to ignore any list nodes and always return properties/values
for list node from the overridden file. See the attached files for an example of what I mean.
The following code always returns the values from config-custom even if list-nodes mentions
that the sysprops node is a list-node.
> 		URL fileURL = TestConfig.class.getResource("config-conf.xml");
> 		
> 		try
> 		{
> 			DefaultConfigurationBuilder configBuilder = new DefaultConfigurationBuilder(fileURL);
> 			CombinedConfiguration config = configBuilder.getConfiguration(true);
> 			System.out.println(config.getString("sysprops/testkey"));
> 			System.out.println(config.getString("configprops/testkey1"));
> 		}
> 		catch (ConfigurationException e)
> 		{
> 			e.printStackTrace();
> 		}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message