mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-07 13:39:36 +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
12 lines
292 B
Java
12 lines
292 B
Java
// "Replace 'switch' with 'if'" "true"
|
|
abstract class Test {
|
|
abstract Object getObject();
|
|
|
|
void foo() {
|
|
if (RuntimeException.class.equals(getObject().getClass())) {
|
|
System.out.println("RuntimeException");
|
|
} else {
|
|
System.out.println("Other");
|
|
}
|
|
}
|
|
} |