Integrated: 8274168: Avoid String.compareTo == 0 to check String equality in java.management

Andrey Turbanov duke at openjdk.java.net
Tue Nov 16 11:17:48 UTC 2021


On Wed, 22 Sep 2021 20:39:51 GMT, Andrey Turbanov <duke at openjdk.java.net> wrote:

> Cleanup places, where String.compareTo is used to check String's equality.
> Instead String.equals or switch expression could be used. They are faster and code is cleaner.

This pull request has now been integrated.

Changeset: a9cb8bdb
Author:    Andrey Turbanov <turbanoff at gmail.com>
Committer: Serguei Spitsyn <sspitsyn at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/a9cb8bdbaac7241959805c491b6d13b6e14f8966
Stats:     30 lines in 2 files changed: 1 ins; 13 del; 16 mod

8274168: Avoid String.compareTo == 0 to check String equality in java.management

Reviewed-by: sspitsyn, dfuchs, cjplummer, dholmes

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

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


More information about the serviceability-dev mailing list