Inspectopedia
 
2024.3

Conditional expression with identical branches

Warning
Last modified: 03 December 2024

Reports conditional expressions with identical then and else branches.

Such expressions almost certainly indicate bugs. The inspection provides a fix that collapses conditional expressions.

Example:

After the quick-fix is applied: