mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-20 02:15:59 +07:00
21 lines
638 B
Java
21 lines
638 B
Java
class X {
|
|
public static void main(Object result) {
|
|
final boolean varargs = result instanceof Intf;
|
|
new Runnable() {
|
|
public void run() { }
|
|
};
|
|
Intf a = (<warning descr="Casting 'result' to 'Intf' may produce 'java.lang.ClassCastException'">Intf</warning>)result;
|
|
}
|
|
|
|
public static void main2(Object result) {
|
|
final boolean varargs = result instanceof Intf;
|
|
if (!varargs) return;
|
|
new Runnable() {
|
|
public void run() { }
|
|
};
|
|
if (<warning descr="Condition 'result instanceof Intf' is always 'true'">result instanceof Intf</warning>) {
|
|
System.out.println();
|
|
}
|
|
}
|
|
}
|
|
interface Intf {} |