Back to Intellij Community

DoubleNegation

java/java-impl/resources/inspectionDescriptions/DoubleNegation.html

2025.3-rc-2251 B
Original Source

Reports double negations that can be simplified.

Example:

if (!!functionCall()) {}

After the quick-fix is applied:

if (functionCall()) {}

Example:

if (!(a != b)) {}

After the quick-fix is applied:

if (a == b) {}