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

(spec str) StringBuffer.insert(int, char[]) specification is inconsistent

XMLWordPrintable

    • b75
    • sparc
    • solaris_2.5
    • Verified

      Name: mgC56079 Date: 06/16/99


      According to JLS method java.lang.StringBuffer(int, char[]) throws
      NullPointerException and IndexOutOfBoundsException, but it is not
      specified, which exception has higher priority. In JDK1.2.2
      IndexOutOfBoundsException has higher priority, but it is more logical to
      check for null first, and only after that check for valid index in the
      array.

      ======================================================================

      Name: mgC56079 Date: 06/17/99


      Sorry, the problem is in java.lang.StringBuffer.insert(int, char[]),
      not in java.lang.StringBuffer(int, char[]).

      ======================================================================

            jgish Jim Gish (Inactive)
            gorsunw Gor Gor (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: