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

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

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

          bayard Henri Yandell added a comment -

          Taken care of. Threw a unit test in because it's a Monday and they're half price:

          svn ci -m "Fixing Javadoc and adding Unit Test for the example for #LANG-261. " src/test/org/apache/comm
          ons/lang/StringUtilsTest.java src/java/org/apache/commons/lang/StringUtils.java
          Sending src/java/org/apache/commons/lang/StringUtils.java
          Sending src/test/org/apache/commons/lang/StringUtilsTest.java
          Transmitting file data ..
          Committed revision 411898.

          bayard Henri Yandell added a comment - Taken care of. Threw a unit test in because it's a Monday and they're half price: svn ci -m "Fixing Javadoc and adding Unit Test for the example for # LANG-261 . " src/test/org/apache/comm ons/lang/StringUtilsTest.java src/java/org/apache/commons/lang/StringUtils.java Sending src/java/org/apache/commons/lang/StringUtils.java Sending src/test/org/apache/commons/lang/StringUtilsTest.java Transmitting file data .. Committed revision 411898.

          People

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

            Dates

              Created:
              Updated:
              Resolved: