Monday, 12 May 2025

Intellij: Disable "Flip comparison" tipp for null checks

IntelliJ IDEA 2025.1.1.1 (Ultimate Edition)

Since a short amount of time IntelliJ wants me to change something like "x != null" to "null != x", because it likes the constant on the left side and null seems to be a constant for IntelliJ.

I really don't think this is something I should pay attention to and I wanted this new behavior gone in my IDE.

To disable this: Settings > Editor > Inspections > Java > Code style issues > Constant on wrong side of comparison