mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
dfa: flush resource variables when leaving try block
This commit is contained in:
+8
@@ -312,6 +312,14 @@ public class ControlFlowAnalyzer extends JavaElementVisitor {
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (parent instanceof PsiTryStatement) {
|
||||
PsiResourceList list = ((PsiTryStatement)parent).getResourceList();
|
||||
if (list != null) {
|
||||
for (PsiResourceVariable variable : list.getResourceVariables()) {
|
||||
myCurrentFlow.removeVariable(variable);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override public void visitBlockStatement(PsiBlockStatement statement) {
|
||||
|
||||
Reference in New Issue
Block a user