mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-29 08:20:55 +07:00
16 lines
354 B
Java
16 lines
354 B
Java
// "Replace 'switch' with 'if'" "true-preview"
|
|
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
|
class Test {
|
|
|
|
void foo(@NotNull Object o) {
|
|
if (o instanceof String) {
|
|
System.out.println("one");
|
|
} else if (o instanceof Integer) {
|
|
System.out.println("two");
|
|
} else {
|
|
System.out.println("default");
|
|
}
|
|
}
|
|
} |