RFR: 8274168: Avoid String.compareTo == 0 to check String equality in java.management [v2]

Serguei Spitsyn sspitsyn at openjdk.java.net
Thu Sep 23 15:25:57 UTC 2021


On Thu, 23 Sep 2021 08:00:25 GMT, Andrey Turbanov <github.com+741251+turbanoff at openjdk.org> 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.
>
> Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision:
> 
>   8274168: Avoid String.compareTo == 0 to check String equality in java.management
>   call compareTo only once

Looks good. Thank you for the update!
Thanks,
Serguei

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

Marked as reviewed by sspitsyn (Reviewer).

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


More information about the serviceability-dev mailing list