You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Henri Yandell (JIRA)" <ji...@apache.org> on 2010/07/06 09:30:50 UTC

[jira] Updated: (LANG-631) StringUtils JavaDoc contains erroneous examples

     [ https://issues.apache.org/jira/browse/LANG-631?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Henri Yandell updated LANG-631:
-------------------------------

    Fix Version/s: 3.0

> StringUtils JavaDoc contains erroneous examples
> -----------------------------------------------
>
>                 Key: LANG-631
>                 URL: https://issues.apache.org/jira/browse/LANG-631
>             Project: Commons Lang
>          Issue Type: Bug
>          Components: lang.*
>    Affects Versions: 2.5, 3.0
>            Reporter: Maxx
>            Priority: Minor
>             Fix For: 3.0
>
>   Original Estimate: 0.02h
>  Remaining Estimate: 0.02h
>
> For the method: static int 	lastIndexOf(String str, String searchStr) 
> @
> (v2.5): http://commons.apache.org/lang/api-release/org/apache/commons/lang/StringUtils.html#lastIndexOf(java.lang.String,%20java.lang.String)
> (v3.0): http://commons.apache.org/lang/api/org/apache/commons/lang3/StringUtils.html#lastIndexOf(java.lang.String,%20java.lang.String)
> These results are wrong:
>  StringUtils.lastIndexOf("aabaabaa", "a")  = 0
>  StringUtils.lastIndexOf("aabaabaa", "b")  = 2
>  StringUtils.lastIndexOf("aabaabaa", "ab") = 1
> Correct values:
> 1st = 7
> 2nd = 5
> 3rd = 4

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.