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

Replace method in StringBuffer in JDK1.2 does not truncate properly

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Cannot Reproduce
    • Affects Version/s: 1.2.0
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • CPU:
      x86
    • OS:
      windows_nt

      Description



      Name: dbT83986 Date: 02/25/99


      I am trying to use the replace method in StringBuffer. When the new string's
      length is smaller than the length of the characters that I am replacing in the
      StringBuffer it does not truncate appropriately.

      eg.
      StringBuffer xxx = new StringBuffer("This is a test");
      xxx = replace(5, 10, "xxx");
      System.out.println(xxx);

      This returns the following :
      Thisxxx a test
      (Review ID: 48667)
      ======================================================================

        Attachments

          Activity

            People

            Assignee:
            mmcclosksunw Michael Mccloskey (Inactive)
            Reporter:
            dblairsunw Dave Blair (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: