New object is compared using '=='
Reports code that applies
!= to a newly allocated object instead of calling
The references to newly allocated objects cannot point at existing objects, thus the comparison will always evaluate to
false. The inspection may also report newly created objects returned from simple methods.
After the quick-fix is applied:
New in 2018.3
IntelliJ IDEA 2023.3, Qodana for JVM 2023.3