mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
IDEA-129331 False positive for possible NPE
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
import org.jetbrains.annotations.Contract;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
class Doo {
|
||||
|
||||
void foo(Throwable e) {
|
||||
@@ -9,4 +12,18 @@ class Doo {
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
abstract class Test04 {
|
||||
@Nullable
|
||||
@Contract(pure = true)
|
||||
abstract Test04 getParent();
|
||||
|
||||
Test04 getTopParent() {
|
||||
Test04 top = this;
|
||||
while (top.getParent() != null) {
|
||||
top = top.getParent();
|
||||
}
|
||||
return top;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user