On Wed, 22 Sep 2021 23:14:39 GMT, Serguei Spitsyn <sspit...@openjdk.org> wrote:

>> 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.

I look at it this way, the code should really (IMHO) have been written as:

int res = sval1.compareTo(sval2);
switch(relOp) {
case Query.GT: return res > 0;
case ...
}

 and so the use of equals() instead would never have arisen. :)

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

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

Reply via email to