commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LANG-1281) Javadoc of StringUtils.ordinalIndexOf is contradictory.
Date Thu, 03 Nov 2016 20:15:59 GMT

    [ https://issues.apache.org/jira/browse/LANG-1281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15634101#comment-15634101
] 

ASF GitHub Bot commented on LANG-1281:
--------------------------------------

GitHub user PascalSchumacher opened a pull request:

    https://github.com/apache/commons-lang/pull/205

    LANG-1281: Javadoc of StringUtils.ordinalIndexOf is contradictory

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/PascalSchumacher/commons-lang StringUtils#ordialIndexOf_javadoc

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/commons-lang/pull/205.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #205
    
----
commit e5997106b568d321462278911980b8c81d0679e6
Author: pascalschumacher <pascalschumacher@gmx.net>
Date:   2016-11-03T20:14:36Z

    LANG-1281: Javadoc of StringUtils.ordinalIndexOf is contradictory

----


> Javadoc of StringUtils.ordinalIndexOf is contradictory.
> -------------------------------------------------------
>
>                 Key: LANG-1281
>                 URL: https://issues.apache.org/jira/browse/LANG-1281
>             Project: Commons Lang
>          Issue Type: Bug
>          Components: lang.*
>    Affects Versions: 3.5
>            Reporter: Andreas Lundblad
>            Priority: Minor
>
> Javadoc of StringUtils.ordinalIndexOf states the following:
> "The code increments the starting index by one, rather than by the length of the match
string, so matches may overlap."
> But then gives the following example:
> StringUtils.ordinalIndexOf("aabaabaa", "", 2) = 0
> which clearly indicates that it does *not* increment the starting index by one in case
of the empty string.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message