boolean (@NotNull PsiVariable variable, @NotNull Map<? super PsiElement, Collection<ControlFlowUtil.VariableInfo>> finalVarProblems) { if (variable instanceof PsiLocalVariable) { PsiElement parent = variable.getParent(); if (parent == null) return false; PsiElement declarationScope = parent.getParent(); if (declarationScope == null) return false; Collection<ControlFlowUtil.VariableInfo> codeBlockProblems = getFinalVariableProblemsInBlock(finalVarProblems, declarationScope); return codeBlockProblems.contains(new ControlFlowUtil.VariableInfo(variable, null)); } if (variable instanceof PsiParameter parameter) { return isAssigned(parameter); } return false; }