Release Note: Relax String Creation Requirements in StringBuilder and StringBuffer

XMLWordPrintable

    • Type: Sub-task
    • Resolution: Delivered
    • Priority: P4
    • 25
    • Affects Version/s: 25
    • Component/s: core-libs

      The specifications of the `substring`, `subSequence`, and `toString` methods of the `StringBuilder` and `StringBuffer` classes have changed not to require a new `String` instance to be returned every time. This allows implementations to improve performance by returning an already-existing string, such as the empty string, when that is appropriate. In all cases, a `String` containing the expected value will be returned. However, applications should not depend on these methods to return a *new* `String` instance every time.

            Assignee:
            Stuart Marks
            Reporter:
            Stuart Marks
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: