mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 23:39:39 +07:00
IDEA-215325 Provide "surround with instanceof" fix for possible class cast warning
Also 'assert x instanceof Type' fix is provided GitOrigin-RevId: 56603a5cb9ce2040525b4147cc8fcabd6f6d7d5d
This commit is contained in:
committed by
intellij-monorepo-bot
parent
f0dcbe74ae
commit
a67207d6c8
@@ -0,0 +1,9 @@
|
||||
// "Surround with 'if (obj instanceof String)'" "true"
|
||||
class X {
|
||||
void test(Object obj) {
|
||||
if (obj instanceof Integer) System.out.println();
|
||||
if (obj instanceof String) {
|
||||
String string = (String)obj;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user