On Wed, 22 Sep 2021 19:20:35 GMT, Andrey Turbanov 
<github.com+741251+turban...@openjdk.org> 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.

src/jdk.internal.jvmstat/share/classes/sun/jvmstat/perfdata/monitor/AliasFileParser.java
 line 145:

> 143: 
> 144:             } while ((currentToken.ttype != StreamTokenizer.TT_EOF)
> 145:                      && (!currentToken.sval.equals(ALIAS)));

Nit: Not your issue but you can also get rid of unneeded brackets () at lines 
128-129, 144-145.

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

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

Reply via email to