RFR: 8274168: Avoid String.compareTo == 0 to check String equality in java.management
Serguei Spitsyn
sspitsyn at openjdk.java.net
Wed Sep 22 23:18:54 UTC 2021
On Wed, 22 Sep 2021 21:52:03 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:
>> But it's now consistent with Query operator: **EQ**uals
>
> All of the other case statements map a Query operator to an arithmetic operator, including mapping EQ to ==, even after your changes (see the previous switch blocks). So your use of `equals` really sticks out as not being consistent with the surrounding code.
I agree with Chris on this.
Fix in the other file looks okay to me.
-------------
PR: https://git.openjdk.java.net/jdk/pull/5640
More information about the serviceability-dev
mailing list