[ 
https://issues.apache.org/jira/browse/CONFIGURATION-443?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13018546#comment-13018546
 ] 

Oliver Heger commented on CONFIGURATION-443:
--------------------------------------------

Thanks for the unit test. I can now reproduce the problem.

Unfortunately, I am not sure how to fix this. If the key passed to 
{{getSource()}} points to a view node, the combined configuration cannot 
determine the source configuration on its own. The only component which has 
this information is the node combiner. IMHO we have the following options:
* we could either delegate the call to the combiner (which would mean extending 
the {{NodeCombiner}} interface - which is a binary incompatible change) or
* we could add a reference to the original node to the view node which has to 
be populated by the combiner.

Both options would make the code more complex, and I wonder whether it is worth 
the effort. Is the information about the source configuration really so 
important?

Maybe there is a simpler solution I just don't see?

> CombinedConfiguration getSource does not work when configuration contains 
> ViewNodes
> -----------------------------------------------------------------------------------
>
>                 Key: CONFIGURATION-443
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-443
>             Project: Commons Configuration
>          Issue Type: Bug
>    Affects Versions: 1.6
>         Environment: windows, but should be independent
>            Reporter: jo desmet
>         Attachments: SourceTest.java, component1.xml, component1_spec.xml
>
>
> Using the getSource in the combined configuration does not work when 
> configurations have been combined.
> In that case the fetchNodeList(key) returns a viewnode which will never match 
> on specific configuration.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to