mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-05 08:06:56 +07:00
The algorithm of deducing of how catch type and instructions in a try statement are related didn't use to be robust, this patch introduces a graph based approach to capture the essence of catch types and instructions in a try statement relation. The graph is a DAG with catch sections on the top level, they are connected to exceptions vertices: since a catch section can have a disjoint set of types in its declaration, each catch section vertex can have a multiple children. At the lowest level there are instructions of a try statement that induce exceptions. Such a structure of a graph makes it possible to implement a robust algorithm to deduce essential types in catch sections. Signed-off-by: Nikita Eshkeev <nikita.eshkeev@jetbrains.com> GitOrigin-RevId: 8cd2a8223ff0b472d8dfde3e611b4797edb36d5a
14 lines
173 B
Java
14 lines
173 B
Java
// "FileNotFoundException" "true"
|
|
import java.io.FileNotFoundException;
|
|
|
|
class Main {
|
|
public void f() {}
|
|
|
|
{
|
|
try {
|
|
f();
|
|
} catch (Exception e) {
|
|
}
|
|
}
|
|
}
|