RFR: 8339704: Refactor StringConcatHelper simpleConcat

Shaojin Wen swen at openjdk.org
Sun Sep 8 08:36:31 UTC 2024


The string concatenation of the java.base module is implemented using StringBuilder. By providing a series of concat methods in StringConcatHelper, it is used in the java.lang package to replace string concatenation.

These concat methods can also be exposed through JLA for use by other packages, such as java.lang.constant.

These concat methods can replace Concat1 and become part of StringConcatFactory#simpleConcat

-------------

Commit messages:
 - Merge remote-tracking branch 'upstream/master' into str_factory_more_simple_concat_202408
 - Merge remote-tracking branch 'upstream/master' into str_factory_more_simple_concat_202408
 - refactor simple concat

Changes: https://git.openjdk.org/jdk/pull/20726/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=20726&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8339704
  Stats: 330 lines in 4 files changed: 229 ins; 88 del; 13 mod
  Patch: https://git.openjdk.org/jdk/pull/20726.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/20726/head:pull/20726

PR: https://git.openjdk.org/jdk/pull/20726


More information about the core-libs-dev mailing list