Inspectopedia Help

Boolean variable is always inverted

Reports boolean variables or fields which are always negated when their value is used.

Example:

void m() { boolean b = true; //boolean variable 'b' is always inverted System.out.println(!b); }

Inspection Details

Available in:

IntelliJ IDEA 2023.3, Qodana for JVM 2023.3

Plugin:

Java, 233.SNAPSHOT

Last modified: 13 July 2023