mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-01 12:50:56 +07:00
15 lines
336 B
Java
15 lines
336 B
Java
// "Replace 'switch' with 'if'" "true-preview"
|
|
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;
|
|
}
|
|
}
|
|
} |