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

Fix Javadoc for StringUtils.normalizeSpace

    XMLWordPrintableJSON

    Details

    • Type: Task
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 2.6
    • Fix Version/s: 3.0
    • Component/s: lang.*
    • Labels:
      None

      Description

      The Javadocs for StringUtils.normalizeSpace state:

      "The function returns the argument string with whitespace normalized by using trim(String) to remove leading and trailing whitespace and then replacing sequences of whitespace characters by a single space."

      Looking at the source code StringUtils.normalizeSpace actually uses strip, not trim. The difference is subtle, but should be corrected.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              efenderbosch Eric Fenderbosch
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: