commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörg Schaible <joerg.schai...@gmx.de>
Subject Re: [configuration] wrong test for CompositeConfiguration.subset ?
Date Thu, 04 Mar 2004 21:02:54 GMT
Emmanuel Bourg wrote:
> I tracked back the code to the version in Velocity, this was changed in
> the revision 1.14 of Configuration.java 3 years ago:
> 
>
http://cvs.apache.org/viewcvs.cgi/jakarta-velocity/src/java/org/apache/velocity/runtime/configuration/Configuration.java?r1=1.13&r2=1.14&diff_format=h
> 
> 
> 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.

Fine with me. I think also, it is more consistant to return null.
Please apply first my patch of
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=27427 to this function.
You may just remove afterwards the test for equality.

Regards,
Jörg


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message