Duplicate :
|
Since Java SE 8, javac has two ways of performing equality tests: a loose one (the historical one) and a stricter one (closer to JLS) which was necessary to have in order a sound implementation of the new inference scheme. As the compiler implementation was progressively refined, we should try and get rid of remaining uses of the loose equality check. See: http://mail.openjdk.java.net/pipermail/compiler-dev/2018-January/011593.html