2020-12-21 15:38:52 +01:00
|
|
|
== Compliant Solution
|
|
|
|
|
2022-02-04 17:28:24 +01:00
|
|
|
[source,text]
|
2020-12-21 15:38:52 +01:00
|
|
|
----
|
|
|
|
if (booleanMethod()) { /* ... */ }
|
|
|
|
if (!booleanMethod()) { /* ... */ }
|
|
|
|
if (booleanMethod()) { /* ... */ }
|
|
|
|
doSomething(true);
|
|
|
|
doSomething(booleanMethod());
|
|
|
|
|
|
|
|
booleanVariable = booleanMethod();
|
|
|
|
booleanVariable = booleanMethod() || exp;
|
|
|
|
booleanVariable = !booleanMethod() && exp;
|
|
|
|
booleanVariable = !booleanMethod() || exp;
|
|
|
|
booleanVariable = booleanMethod() && exp;
|
|
|
|
----
|