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

StringUtils.repeat('z', -1) throws NegativeArraySizeException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 3.5
    • lang.*
    • None

    Description

      Unlike what is said in JavaDoc comment, when passing a negative repeat value to the StringUtils.repeat(char, int) function, it doesn't return an empty String but throws a NegativeArraySizeException.

      See PR #72 : https://github.com/apache/commons-lang/pull/72

      Attachments

        Activity

          People

            britter Benedikt Ritter
            rikles Loic Guibert
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: