ControlFlowUtils#getInitializerUsageStatus fixed for do-while loops where var is declared just before the loop

This commit is contained in:
Tagir Valeev
2018-02-21 12:24:01 +07:00
parent 6ca2e4122f
commit c483ae9cd0
3 changed files with 46 additions and 14 deletions
@@ -0,0 +1,19 @@
// "Replace with collect" "false"
import java.util.ArrayList;
import java.util.List;
public class Main {
List<String> test(String[][] data) {
int i = data.length - 1;
List<String> list = new ArrayList<>();
do {
fo<caret>r (String s : data[i]) {
if (!s.isEmpty()) {
list.add(s);
}
}
} while(--i > 0);
return list;
}
}