You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Maxx (JIRA)" <ji...@apache.org> on 2010/07/05 11:29:54 UTC
[jira] Created: (LANG-631) StringUtils JavaDoc contains erroneous
examples
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
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.
[jira] Updated: (LANG-631) StringUtils JavaDoc contains erroneous
examples
Posted by "Henri Yandell (JIRA)" <ji...@apache.org>.
[ 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.
[jira] Closed: (LANG-631) StringUtils JavaDoc contains erroneous
examples
Posted by "Henri Yandell (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LANG-631?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Henri Yandell closed LANG-631.
------------------------------
Resolution: Fixed
Current trunk had addressed this, but had transposed the 4 and 5 results. I've fixed that in r960831, namely:
* StringUtils.lastIndexOf("aabaabaa", "a") = 7
* StringUtils.lastIndexOf("aabaabaa", "b") = 5
* StringUtils.lastIndexOf("aabaabaa", "ab") = 4
> 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
> 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.