rspec/rules/S2583/java/rule.adoc
2021-01-27 13:42:22 +01:00

30 lines
466 B
Plaintext

include::../description.adoc[]
include::../noncompliant.adoc[]
== Exceptions
This rule will not raise an issue in either of these cases:
* When the condition is a single ``++final boolean++``
----
final boolean debug = false;
//...
if (debug) {
// Print something
}
----
* When the condition is literally ``++true++`` or ``++false++``.
----
if (true) {
// do something
}
----
In these cases it is obvious the code is as intended.
include::../see.adoc[]