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

StringBuilder.insert call is a cause of Stack Overflow

    • tiger
    • generic
    • generic
    • Verified



      Name: skR10005 Date: 08/29/2003


      New JCK tests
      api/java_lang/StringBuilder/index.html#insert[StringBuilder0031]
      api/java_lang/StringBuilder/index.html#insert[StringBuilder0032]
      fail on jdk1.5.0-b17 with java.lang.StackOverflowError exception.

      The tests check StringBuilder.insert(int offset, boolean b) method.

      Looking at the source of StringBuilder, you can see:
          public StringBuilder insert(int offset, boolean b) {
      insert(offset, b);
              return this;
          }
      It looks like "super." is missed in invocation of insert method.


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

            mmcclosksunw Michael Mccloskey (Inactive)
            serjsunw Serj Serj (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: