Remove nested assignment. #1555
Fixes `NestedAssignment` inspection violation in test code. Description: >Reports assignment expressions nested inside other expressions. While admirably terse, such expressions may be confusing, and violate the general design principle that a given construct should do precisely one thing.
This commit is contained in:
parent
b02dba99c5
commit
06863d123f
|
|
@ -102,7 +102,11 @@ public class ConfigurationBuilder extends BaseCheckTestSupport {
|
|||
int lineNumber = 1;
|
||||
List<Integer> result = new ArrayList<>();
|
||||
try(BufferedReader br = new BufferedReader(new FileReader(aFileName))) {
|
||||
for(String line; (line = br.readLine()) != null; ) {
|
||||
while (true) {
|
||||
String line = br.readLine();
|
||||
if (line == null) {
|
||||
break;
|
||||
}
|
||||
if (warnPattern.matcher(line).find()) {
|
||||
result.add(lineNumber);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue