mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-20 11:36:16 +07:00
22 lines
562 B
Java
22 lines
562 B
Java
class DataFlowBug {
|
|
|
|
void foo() {
|
|
RuntimeException o = System.nanoTime() % 2 == 0 ? null : new RuntimeException();
|
|
throw <warning descr="Dereference of 'o' may produce 'java.lang.NullPointerException'">o</warning>;
|
|
}
|
|
|
|
void foo2() {
|
|
try {
|
|
RuntimeException o = System.nanoTime() % 2 == 0 ? null : new RuntimeException();
|
|
throw <warning descr="Dereference of 'o' may produce 'java.lang.NullPointerException'">o</warning>;
|
|
}
|
|
catch (RuntimeException exception) {
|
|
|
|
}
|
|
}
|
|
|
|
void foo(RuntimeException tt) {
|
|
throw tt;
|
|
}
|
|
|
|
} |