mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-05 18:50:54 +07:00
Fixes IDEA-309095 Improve the Safety of "Introduce Variable" Refactorings concening ClassCasts GitOrigin-RevId: a9c401378523aaf0142cde161e477a3675de3d5f
9 lines
334 B
Java
9 lines
334 B
Java
public class splitMutuallyExclusiveIf {
|
|
void foo(Object obj) {
|
|
if (obj instanceof Integer && ((Integer) obj).intValue() > 0) {
|
|
System.out.println(((Integer) obj).int<caret>Value());
|
|
} else if (obj instanceof Float && ((Float) obj).floatValue() > 0.0) {
|
|
System.out.println(((Float) obj).floatValue());
|
|
}
|
|
}
|
|
} |