mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-27 19:28:58 +07:00
in "Duplicate branches in 'switch'" inspection fix GitOrigin-RevId: 7b22a3409f5d9237f432ab3dd35f27cacfbd7737
19 lines
430 B
Java
19 lines
430 B
Java
// "Merge with 'case 1'" "GENERIC_ERROR_OR_WARNING"
|
|
class C {
|
|
int foo(int n) {
|
|
int s = 0;
|
|
for (int i = 0; i < n; i++) {
|
|
switch (i % 4) {
|
|
case 1, 3:
|
|
s += i;
|
|
continue;
|
|
case 2:
|
|
continue;
|
|
default:
|
|
s += i;
|
|
}
|
|
s /= 2;
|
|
}
|
|
return s;
|
|
}
|
|
} |