RFR: 8274525: Replace uses of StringBuffer with StringBuilder in java.xml

Naoto Sato naoto at openjdk.java.net
Thu Sep 30 23:02:33 UTC 2021


On Wed, 29 Sep 2021 17:56:49 GMT, Andrey Turbanov <github.com+741251+turbanoff at openjdk.org> 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
> 
> Similar cleanups:
> 1. [JDK-8264029](https://bugs.openjdk.java.net/browse/JDK-8264029) java.base
> 2. [JDK-8264428](https://bugs.openjdk.java.net/browse/JDK-8264428) java.desktop
> 3. [JDK-8264484](https://bugs.openjdk.java.net/browse/JDK-8264484) jdk.hotspot.agent

Marked as reviewed by naoto (Reviewer).

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

PR: https://git.openjdk.java.net/jdk/pull/5759


More information about the core-libs-dev mailing list