Emmanuel Bourg wrote on Thursday, March 04, 2004 7:56 PM:
> I'm reviewing the subset code and found a confusing test case for
> CompositeConfiguration:
>
> subset = cc.subset("test.short");
> assertEquals("1", subset.getString("test.short"));
>
>
> Is this right ? The "test.short" prefix should be removed
> from the keys
> in the subset, and unless the key "test.short.test.short"
> exists in the
> parent configuration, no value should be associated to the
> "test.short" key in the subset and the assertion should fail.
>
> I think the right test is:
>
> subset = cc.subset("test");
> assertEquals("1", subset.getString("short"));
Well, there is a special comment in the subset implementation for this case.
It was obviously intented that if subset pattern == key a subset with this single key
is delivered. But I cannot tell you why it was originally implemented in this way and
what we would break changing the behaviour for this case ...
Regards,
J�rg
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]