Jörg Schaible wrote:

after recognizing, that you've attached the diff, I had a look at the
changes in the test case. I am not quite sure, that this is really good.
Intentionally I thought, you would return an empty configuration only, if
the pattern equals the key, but you do so now also if the pattern does not
match at all.

This will break my usage of Configuration for certain and I am probably not
alone here.

You expect subset() to return a null configuration instead of an empty configuration ?


I see one issue with the current implementation, it is not possible to access the property in the parent configuration with a key matching the prefix of the subset (the subset root property):

conf.setProperty("x.y.z", "1");
subset = conf.subset("x.y.z");

Here subset is empty and I can't read the value of "x.y.z". If I call subset.getProperty("") it will return null because the key "x.y.z." doesn't exist in the parent configuration. I think I'll change the implementation I suggested to allow the use of a null (or "" ?) key to access the subset root property, that's subset.getProperty(null) returns "1".

Emmanuel Bourg


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



Reply via email to