mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 15:27:45 +07:00
ControlFlowUtils#getInitializerUsageStatus fixed for do-while loops where var is declared just before the loop
This commit is contained in:
+19
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user