Optimize empty substring handling

XMLWordPrintable

    • Type: CSR
    • Resolution: Approved
    • Priority: P4
    • 15
    • Component/s: core-libs
    • None
    • behavioral
    • low
    • An application depending on the identity of empty sub-strings could eventually break.
    • Java API
    • Implementation

      Summary

      Optimize String.substring and related operations like stripLeading, stripTrailing to avoid redundantly creating a new empty String.

      Problem

      For some inputs, the identity of an empty string returned by String.substring and stripLeading will change with this optimization.

      Solution

      Accept the behavior change and add a release note.

      Specification

      No specification change.

            Assignee:
            Claes Redestad
            Reporter:
            Claes Redestad
            Alan Bateman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: