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

Error in an example in the javadoc of the StringUtils.splitPreserveAllTokens() method

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

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 2.1
    • 2.2
    • lang.*
    • None

    Description

      There is an error in the javadoc of the org.apache.commons.lang.StringUtils.splitPreserveAllTokens(String str,char separatorChar) method.

      Here the original line :
      StringUtils.splitPreserveAllTokens("a..b.c", '.') = ["a", "b", "c"]

      But it should be :
      StringUtils.splitPreserveAllTokens("a..b.c", '.') = ["a", "", "b", "c"]

      Attachments

        Activity

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

          People

            Unassigned Unassigned
            cimballi Cimballi
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment