mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Fix dataflow for unchecked exceptions in multi-catch
This commit is contained in:
@@ -3,8 +3,8 @@ import org.jetbrains.annotations.NotNull;
|
||||
public class BrokenAlignment {
|
||||
|
||||
@NotNull
|
||||
Object test(){
|
||||
try{
|
||||
Object test1() {
|
||||
try {
|
||||
bar(<warning descr="Passing 'null' argument to parameter annotated as @NotNull">null</warning>);
|
||||
return <warning descr="'null' is returned by the method declared as @NotNull">null</warning>;
|
||||
}
|
||||
@@ -13,6 +13,28 @@ public class BrokenAlignment {
|
||||
}
|
||||
}
|
||||
|
||||
@NotNull
|
||||
Object test2() {
|
||||
try {
|
||||
bar(<warning descr="Passing 'null' argument to parameter annotated as @NotNull">null</warning>);
|
||||
return <warning descr="'null' is returned by the method declared as @NotNull">null</warning>;
|
||||
}
|
||||
catch (IllegalArgumentException | IllegalStateException e) {
|
||||
return <warning descr="'null' is returned by the method declared as @NotNull">null</warning>;
|
||||
}
|
||||
}
|
||||
|
||||
@NotNull
|
||||
Object test3() {
|
||||
try {
|
||||
bar(<warning descr="Passing 'null' argument to parameter annotated as @NotNull">null</warning>);
|
||||
return <warning descr="'null' is returned by the method declared as @NotNull">null</warning>;
|
||||
}
|
||||
catch (AssertionError | IllegalStateException e) {
|
||||
return <warning descr="'null' is returned by the method declared as @NotNull">null</warning>;
|
||||
}
|
||||
}
|
||||
|
||||
public void bar(@NotNull Object foo) {
|
||||
assert <warning descr="Condition 'foo != null' is always 'true'">foo != null</warning>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user