17 lines
416 B
Plaintext
17 lines
416 B
Plaintext
== Compliant Solution
|
|
|
|
[source,text]
|
|
----
|
|
if (booleanMethod()) { /* ... */ }
|
|
if (!booleanMethod()) { /* ... */ }
|
|
if (booleanMethod()) { /* ... */ }
|
|
doSomething(true);
|
|
doSomething(booleanMethod());
|
|
|
|
booleanVariable = booleanMethod();
|
|
booleanVariable = booleanMethod() || exp;
|
|
booleanVariable = !booleanMethod() && exp;
|
|
booleanVariable = !booleanMethod() || exp;
|
|
booleanVariable = booleanMethod() && exp;
|
|
----
|