Integrated: 8274163: Use String.equals instead of String.compareTo in jdk.jcmd
Andrey Turbanov
duke at openjdk.java.net
Tue Nov 16 11:20:46 UTC 2021
On Wed, 22 Sep 2021 19:14:03 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: 9629627e
Author: Andrey Turbanov <turbanoff at gmail.com>
Committer: Serguei Spitsyn <sspitsyn at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/9629627e2c8021c254517ac5463cc66723175fd9
Stats: 35 lines in 4 files changed: 0 ins; 0 del; 35 mod
8274163: Use String.equals instead of String.compareTo in jdk.jcmd
Reviewed-by: cjplummer, amenkov, sspitsyn
-------------
PR: https://git.openjdk.java.net/jdk/pull/5637
More information about the serviceability-dev
mailing list