mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-118082 "Constant conditions & exceptions" warning expected inside local class
This commit is contained in:
+2
-6
@@ -232,12 +232,8 @@ public class DataFlowRunner {
|
||||
}
|
||||
else if (instruction instanceof EmptyInstruction) {
|
||||
PsiElement anchor = ((EmptyInstruction)instruction).getAnchor();
|
||||
if (anchor instanceof PsiDeclarationStatement) {
|
||||
for (PsiElement element : ((PsiDeclarationStatement)anchor).getDeclaredElements()) {
|
||||
if (element instanceof PsiClass) {
|
||||
registerNestedClosures(instructionState, (PsiClass)element);
|
||||
}
|
||||
}
|
||||
if (anchor instanceof PsiClass) {
|
||||
registerNestedClosures(instructionState, (PsiClass)anchor);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -13,5 +13,10 @@ class Test {
|
||||
}
|
||||
}
|
||||
}
|
||||
class Local {
|
||||
void s(@Nullable String s) {
|
||||
final int i = <warning descr="Method invocation 's.hashCode()' may produce 'java.lang.NullPointerException'">s.hashCode()</warning>;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user