RFR: 8138614: (spec str) StringBuffer and StringBuilder methods improperly require "new" String to be returned
Alan Bateman
alanb at openjdk.org
Thu Feb 13 09:28:30 UTC 2025
On Wed, 12 Feb 2025 19:55:29 GMT, Stuart Marks <smarks at openjdk.org> wrote:
> A couple adjustments to the specs for four methods of StringBuilder and StringBuffer so that they no longer require new Strings to be created, just a String with the right contents. No implementation changes. Note that the actual specs (and implementations) are actually in AbstractStringBuilder, and they're inherited by StringBuilder and StringBuffer.
I think this is okay. It is of course possible that something shows up that depended on a new string being created each time so a release note (in addition the CSR) would be helpful.
-------------
Marked as reviewed by alanb (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/23599#pullrequestreview-2614382584
More information about the core-libs-dev
mailing list