Inspectopedia Help

Simplifiable boolean expression

Reports boolean expressions that can be simplified.

Example:

void f(boolean foo, boolean bar) { boolean b = !(foo ^ bar); }
void f(boolean foo, boolean bar) { boolean b = foo == bar; }

Example:

void f(boolean foo, boolean bar) { boolean b = (foo && bar) || !foo; }
void f(boolean foo, boolean bar) { boolean b = !foo || bar; }

Inspection Details

By default bundled with:

IntelliJ IDEA 2024.1, Qodana for JVM 2024.1,

Can be installed with plugin:

Java, 241.14841

Last modified: 12 March 2024