Files
Mikhail Pyltsinandintellij-monorepo-bot 29c026eaf2 [java-inspections] IDEA-360880 Replace cast expressions with pattern variable does nothing inside of ternary operator
- use PsiStatement as scope instead of PsiIfStatement
- more tests

GitOrigin-RevId: 2602190296988a80d54520c7a0f15fd0f8e3d942
2024-10-28 21:01:30 +00:00

17 lines
430 B
Java

// "Replace cast expressions with pattern variable" "true"
public final class A {
private static boolean foo4(Number o, Number n) {
if (!(o instanceof Integer)) {
return false;
} else if (((In<caret>teger) o).describeConstable().get() == 1) {
return true;
}
if (((Integer) o).describeConstable().get() == 2) {
return true;
}
return ((Integer) o).describeConstable().get() == 3;
}
}