On Wed, 22 Sep 2021 21:34:12 GMT, Andrey Turbanov <github.com+741251+turban...@openjdk.org> wrote:
>> src/java.management/share/classes/javax/management/BinaryRelQueryExp.java >> line 180: >> >>> 178: return sval1.compareTo(sval2) <= 0; >>> 179: case Query.EQ: >>> 180: return sval1.equals(sval2); >> >> I'm not so sure I agree this is better. Using `compareTo` keeps it >> consistent with the surrounding code. > > 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. ------------- PR: https://git.openjdk.java.net/jdk/pull/5640