Harmony
  1. Harmony
  2. HARMONY-348

java.lang.StringBuilder.replace does not get right result

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Classlib
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      java.lang.StringBuilder.replace(start,end, str) should replace the substring starting at param start and ending at param end -1 with the str parameter, but the Harmony's implementation's behavior is not compliant with spec and RI. The following test case reproduce the bug:

      public void test_replace()

      { StringBuilder buffer = new StringBuilder("1234567"); buffer.replace(2, 6, "XXX"); assertEquals("12XXX7",buffer.toString()); }

      RI(Sun JDK 1.5.0_06) passed
      Harmony failed

      1. harmony-348.diff
        0.9 kB
        Sergey Soldatov

        Activity

          People

          • Assignee:
            Tim Ellison
            Reporter:
            Paulex Yang
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development