void (@NotNull PsiLocalVariable variable) { super.visitLocalVariable(variable); if (m_ignoreAnnotatedVariablesNew) { final PsiModifierList list = variable.getModifierList(); if (list != null) { int length = list.getAnnotations().length; if (length > 0) { PsiAnnotation annotation = list.findAnnotation(SuppressWarnings.class.getName()); if (annotation == null || !JavaSuppressionUtil.getInspectionIdsSuppressedInAnnotation(list) .contains(UnnecessaryLocalVariableInspection.this.getSuppressId())) { return; } } } } if (VariableAccessUtils.isLocalVariableCopy(variable)) { registerVariableError(variable); } else if (!m_ignoreImmediatelyReturnedVariables && isImmediatelyReturned(variable)) { registerVariableError(variable); } else if (!m_ignoreImmediatelyReturnedVariables && isImmediatelyThrown(variable)) { registerVariableError(variable); } else if (isImmediatelyUsedByYield(variable)) { registerVariableError(variable); } else if (isImmediatelyAssigned(variable)) { registerVariableError(variable); } else if (isImmediatelyAssignedAsDeclaration(variable)) { registerVariableError(variable); } }