mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-28 23:50:57 +07:00
1. Do not suggest intention if `default` case is not the last one and fallthrough is possible into or out of that case 2. Generate a code-block if side-effect should be extracted to variable
15 lines
280 B
Java
15 lines
280 B
Java
// "Replace 'switch' with 'if'" "false"
|
|
class X {
|
|
void m(String s) {
|
|
swi<caret>tch (s) {
|
|
case "foo":
|
|
System.out.println(1);
|
|
break;
|
|
default:
|
|
System.out.println(2);
|
|
case "bar":
|
|
System.out.println(3);
|
|
break;
|
|
}
|
|
}
|
|
} |