...
Using the assignment operator in these conditional expressions is permissible if it is not the controlling expression, as shown in the following compliant example:
Code Block | ||
---|---|---|
| ||
String line; BufferedReader reader = // initialize while ((line = reader.readLine()) != null) { // ... work with line } |
Related Guidelines
"Likely Incorrect Expression [KOA]" | |
CWE ID 480, "Use of Incorrect Operator" |
...