Re: RFR: 8274163: Use String.equals instead of String.compareTo in jdk.jcmd

2021-09-22 Thread Serguei Spitsyn
On Wed, 22 Sep 2021 19:14:03 GMT, Andrey Turbanov 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. Looks good. Thanks, Serguei - Marked as rev

Re: RFR: 8274163: Use String.equals instead of String.compareTo in jdk.jcmd

2021-09-22 Thread Alex Menkov
On Wed, 22 Sep 2021 19:14:03 GMT, Andrey Turbanov 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. Marked as reviewed by amenkov (Reviewer). -

Re: RFR: 8274163: Use String.equals instead of String.compareTo in jdk.jcmd

2021-09-22 Thread Chris Plummer
On Wed, 22 Sep 2021 19:14:03 GMT, Andrey Turbanov 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. Looks good. Make sure you have done the appropriate testi

RFR: 8274163: Use String.equals instead of String.compareTo in jdk.jcmd

2021-09-22 Thread Andrey Turbanov
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. - Commit messages: - [PATCH] Use String.equals instead of String.compareTo to check String's equality in jdk.j