Integrated: 8274879: Replace uses of StringBuffer with StringBuilder within java.base classes
Andrey Turbanov
duke at openjdk.java.net
Wed Oct 27 16:21:20 UTC 2021
On Thu, 9 Sep 2021 06:50:21 GMT, Andrey Turbanov <duke at openjdk.java.net> wrote:
> StringBuffer is a legacy synchronized class. There are more modern alternatives which perform better:
> 1. Plain String concatenation should be preferred
> 2. StringBuilder is a direct replacement to StringBuffer which generally have better performance
>
> In [JDK-8264029](https://bugs.openjdk.java.net/browse/JDK-8264029) I migrated only usages which were automatically detected by IDEA. It turns out there are more usages which can be migrated.
This pull request has now been integrated.
Changeset: 9a3e9542
Author: Andrey Turbanov <turbanoff at gmail.com>
Committer: Naoto Sato <naoto at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/9a3e9542997860de79d07a4411b1007e9cd5c348
Stats: 31 lines in 11 files changed: 0 ins; 0 del; 31 mod
8274879: Replace uses of StringBuffer with StringBuilder within java.base classes
Reviewed-by: naoto
-------------
PR: https://git.openjdk.java.net/jdk/pull/5432
More information about the core-libs-dev
mailing list