|
[
Permlink
| « Hide
]
Ralph Goers added a comment - 02/Oct/08 07:19 AM
The patch to implement this feature along with unit tests.
Ralph,
many thanks for your contribution. I had a look at the patch, and this is really some cool stuff. I am happy to apply it, but have the following minor suggestions:
What do you think? I am fine with both of these suggestions. I didn't use the bean declaration mechanism primarily because I hadn't looked at how that worked when I wrote that part of the patch.
Updated patch with requested changes.
Patch applied in revision 701654.
It could even be slightly simplified. As it turned out, defining a custom CombinedConfiguration class as resulting configuration is already supported. This is due to the bean definition mechanism, which automatically looks for a config-class attribute and evaluates it if present; otherwise the default class passed to the BeanHelper is used. Also at the creation of the providers there is no need to explicitly specify the provider class because it is found automatically by the XMLBeanDeclaration. Leaving open until the patch was ported to the configuration-2 branch. Thanks. I should have looked at the javadoc for createBean.
Also, I noticed you cleaned up the unit test a little bit. After looking at it it seems you could have also gotten rid of the creation of the new DefaultConfigurationBuilder in testExtendedClass since that happens in setUp. Thanks for the spot. I missed this one. I updated the test correspondingly.
The patch was also applied to the configuration2 branch.
This is part of the 1.6 release.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||