void (@NotNull PsiJavaCodeReferenceElement reference) { super.visitReferenceElement(reference); PsiElement resolved = reference.resolve(); if (PsiUtil.isJvmLocalVariable(resolved)) { variables.add((PsiVariable)resolved); } else if (resolved instanceof PsiVariable && !((PsiVariable)resolved).hasModifierProperty(PsiModifier.FINAL)) { refFailed.set(Boolean.TRUE); stopWalking(); } }