IDEA-193288 Inspection to detect Xyz.class.isInstance(foo) and Xyz.class.cast(foo)

This commit is contained in:
Tagir Valeev
2018-06-05 12:21:58 +07:00
parent ae37e14386
commit ec483ef976
10 changed files with 201 additions and 1 deletions
@@ -0,0 +1,8 @@
// "Replace with '(Integer)'" "true"
class X {
void test(Object obj) {
if(Integer.class.isInstance(obj)) {
System.out.println((Integer) obj);
}
}
}