Integrated: 8274190: Use String.equals instead of String.compareTo in jdk.internal.jvmstat
Andrey Turbanov
duke at openjdk.java.net
Tue Nov 16 11:19:46 UTC 2021
On Wed, 22 Sep 2021 19:20:35 GMT, Andrey Turbanov <duke at openjdk.java.net> wrote:
> In several places, String.compareTo was _compared_ with 0 ( via `== 0` or `!= 0`).
> Instead of this, we can use String.equals calls. `String.equals` is faster and shorter.
This pull request has now been integrated.
Changeset: 0bc26837
Author: Andrey Turbanov <turbanoff at gmail.com>
Committer: Serguei Spitsyn <sspitsyn at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/0bc268377ed5d2dd15bdd7283a77b59ad505e2b7
Stats: 18 lines in 7 files changed: 0 ins; 3 del; 15 mod
8274190: Use String.equals instead of String.compareTo in jdk.internal.jvmstat
Reviewed-by: cjplummer, sspitsyn
-------------
PR: https://git.openjdk.java.net/jdk/pull/5638
More information about the serviceability-dev
mailing list