mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-09 09:47:51 +07:00
- now it can be suppressed properly - show info level if the branches have different comments GitOrigin-RevId: 5f1c5c0a67165b949b894d2d81c53800ad3b4b22
42 lines
762 B
Java
42 lines
762 B
Java
class C {
|
|
int foo(int n) {
|
|
int s = 0;
|
|
for (int i = 0; i < n; i++) {
|
|
switch (i % 4) {
|
|
case 1:
|
|
s += i;
|
|
continue;
|
|
case 2:
|
|
continue;
|
|
case 3:
|
|
<weak_warning descr="Duplicate branch in 'switch'">s += i;</weak_warning>
|
|
continue;
|
|
default:
|
|
s += i;
|
|
}
|
|
s /= 2;
|
|
}
|
|
return s;
|
|
}
|
|
|
|
int foo2(int n) {
|
|
int s = 0;
|
|
for (int i = 0; i < n; i++) {
|
|
switch (i % 4) {
|
|
case 1:
|
|
s += i;
|
|
continue;
|
|
case 2:
|
|
continue;
|
|
case 3:
|
|
//noinspection DuplicateBranchesInSwitch
|
|
s += i;
|
|
continue;
|
|
default:
|
|
s += i;
|
|
}
|
|
s /= 2;
|
|
}
|
|
return s;
|
|
}
|
|
} |