rspec/rules/S6646/java/why-is-this-an-issue.adoc

9 lines
377 B
Plaintext

== Why is this an issue?
Control flow constructs like `if`-statements allow the programmer to direct the
flow of a program depending on a boolean expression.
However, if the condition is always true or always false, only one of the
branches will ever be executed.
In that case, the control flow construct and the condition no longer serve a
purpose; they become _gratuitous_.