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

StringUtils.chopNewLine - StringIndexOutOfBoundsException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0
    • 2.0
    • lang.*
    • None
    • Operating System: other
      Platform: All

    • 20652

    Description

      StringUtils.chopNewLine doesn't handle a single char string of "\n". It looks
      for the previous char to see if it's "\r" which causes it to throw exception.

      Attachments

        1. ASF.LICENSE.NOT.GRANTED--StringUtils.diff
          0.8 kB
          Fredrik Westermarck
        2. ASF.LICENSE.NOT.GRANTED--StringUtilsTest.diff
          1 kB
          Fredrik Westermarck

        Activity

          People

            Unassigned Unassigned
            six4three@hotmail.com Mark Ford
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: