Uploaded image for project: 'Commons Lang'
  1. Commons Lang
  2. LANG-810

StringUtils.join() endIndex, bugged for loop

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.1
    • 3.2
    • lang.*
    • None

    Description

      endIndex is described as index, but for loop still checks it as "array length".
      Basically missing equal sign

      commons-lang3-3.1-sources.jar, StringUtils.java lines 3309, 3394:
      for (int i = startIndex; i < endIndex; i++) {
      should be:
      for (int i = startIndex; i <= endIndex; i++) {

      Attachments

        1. StringUtilsArraysJoinTest.java
          3 kB
          Krzysztof Nazarewski
        2. StringUtils.java
          260 kB
          Krzysztof Nazarewski

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            drag0nius Krzysztof Nazarewski
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 1m
                1m
                Remaining:
                Remaining Estimate - 1m
                1m
                Logged:
                Time Spent - Not Specified
                Not Specified

                Slack

                  Issue deployment