commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Bourg <>
Subject Re: [configuration] wrong test for CompositeConfiguration.subset ?
Date Thu, 04 Mar 2004 19:31:56 GMT
Jörg Schaible wrote:

> 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 ...

I tracked back the code to the version in Velocity, this was changed in 
the revision 1.14 of 3 years ago:

It looks like a workaround to avoid an IndexOutOfBoundException if the 
key and the prefix have the same length on calling:

key.substring(prefix.length() + 1);

This feature is not documented in the javadoc and the subset produced is 
not useful. Even if it has been around for 3 years I think it's safe to 
assume nobody relies on this.

Emmanuel Bourg

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message