Commons Lang
  1. Commons Lang
  2. LANG-261

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

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 2.1
    • Fix Version/s: 2.2
    • Component/s: lang.*
    • Labels:
      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"]

        Activity

        Hide
        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.

        Show
        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

          • Assignee:
            Unassigned
            Reporter:
            Cimballi
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development