DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24911>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24911 last substring returned by StringUtils.split( String, String, int ) is too long ------- Additional Comments From [EMAIL PROTECTED] 2003-11-23 07:42 ------- Sorry, the patch was too big to easily pinpoint the changes to the tests that demonstrate my desired behavior for the existing methods. They're actually in innerTestSplit(): - assertEquals(msg, str, res[0]); + assertEquals(msg, "a", res[0]); - assertEquals(msg, str.substring(2), res[1]); + assertEquals(msg, "b", res[1]); I agree the above is a change to the contract of these methods; I wanted to raise the question as to whether the existing contract is the most useful/sensible one. It sure surprised me that the last substring returned by the method had different properties from the others. It doesn't make sense to me, but maybe it does to other people. If so, that's fine. Furthermore, the Javadoc example StringUtils.split("ab:cd:ef", ":", 2) = ["ab", "cdef"] should read StringUtils.split("ab:cd:ef", ":", 2) = ["ab", "cd:ef"] in order to reflect what the code currently does (what it does is in some sense sensible, though not what I would expect). What the Javadoc says is just plain weird, but I assume it was a typo. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]