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.
- csr of
-
JDK-8240094 Optimize empty substring handling
-
- Resolved
-