mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 03:13:40 +07:00
insert cast/local variable from instanceof: check if written expression equals operand in instanceof before replacement (IDEA-97941)
This commit is contained in:
+9
@@ -0,0 +1,9 @@
|
||||
// "Cast to 'A'" "true"
|
||||
class A {
|
||||
void foo(Object foo) {
|
||||
if(foo instanceof A) {
|
||||
((A) foo)
|
||||
System.out.println("");
|
||||
}
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// "Cast to 'A'" "true"
|
||||
class A {
|
||||
void foo(Object foo) {
|
||||
if(foo insta<caret>nceof A) {
|
||||
System.out.println("");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user