RFR: 8264484: Replace uses of StringBuffer with StringBuilder in jdk.hotspot.agent

Yasumasa Suenaga ysuenaga at openjdk.java.net
Wed Mar 31 08:26:19 UTC 2021


On Tue, 30 Mar 2021 18:58:24 GMT, Andrey Turbanov <github.com+741251+turbanoff at openjdk.org> wrote:

> Found by IntelliJ IDEA inspection `Java | Java language level migration aids | Java 5 | 'StringBuffer' may be 'StringBuilder'`
> As suggested in https://github.com/openjdk/jdk/pull/1507#issuecomment-757369003 I've created separate PR for module `jdk.hotspot.agent`
> Similar cleanups in the past: https://bugs.openjdk.java.net/browse/JDK-8041679 https://bugs.openjdk.java.net/browse/JDK-8264029

src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime/VMVersionMismatchException.java line 40:

> 38:                 ". Target VM is " + targetVersion;
> 39:         return msg;
> 40:     }

Why don't you return `msg` directly? I think `msg` is not needed.
I saw similar codes in other places.

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

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



More information about the hotspot-gc-dev mailing list