mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-05-01 10:48:09 +07:00
Fixes IDEA-199499 Improve "Replace 'switch' with 'if'" action and make it a quick-fix for "Switch has too few branches" Now default is not counted as branch in SwitchStatementWithTooFewBranches
15 lines
328 B
Java
15 lines
328 B
Java
// "Replace 'switch' with 'if'" "true"
|
|
abstract class Test {
|
|
abstract Object getObject();
|
|
|
|
void foo() {
|
|
<caret>switch(getObject().getClass()) {
|
|
case RuntimeException.class:
|
|
System.out.println("RuntimeException");
|
|
break;
|
|
default:
|
|
System.out.println("Other");
|
|
break;
|
|
}
|
|
}
|
|
} |