...
When the assignment of b
to a
is unintended, this conditional block is now executed only when a
is equal to b
.
Code Block | ||
---|---|---|
| ||
public void f(boolean a, boolean b) {
while ( (a == b) && flag ) {
/* ... */
}
}
|
Use one of the above solutions when the assignment is intended.
...
Related Guidelines
"Likely Incorrect Expression [KOA]" | |
CWE ID 480, "Use of Incorrect Operator" |
...