Maneesh Godbole wrote:Minor nitpick.
Always a good idea to use instead of
I must concur with Mr. Ritchie in not understanding Mr. Godbole's nitpick. JLS 15.21.1 (Numerical Equality Operators == and !=) doesn't mention any anti-commutative behavour, and no unboxing conversions are occurring.
Now the difference between
x.equals(y) and
y.equals(x) is a different matter. Choosing the correct order there is sometimes crucial.
update: originally referenced an irrelevant section of the JLS, oops.