Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-1224284

inconsistency in the type of exception thrown by various StringBuffer methods

XMLWordPrintable

    • sparc
    • solaris_2.5

      The setLength(), charAt(). and getChars() methods all throw a
      StringIndexOutOfBoundsException when its index paramert is
      out of range. The other methods in StringBuffer that accept an
      index as an argument throw ArrayIndexOutOfBoundsException
      when the index is out of range.

      All the methods that detect an index that is out of range should throw the
      same exception: StringIndexOutOfBoundsException...

            fyellinsunw Frank Yellin (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: