@Override
    public void visitVariable(@NotNull PsiVariable variable) {
      if (isOnTheFly() && DeclarationSearchUtils.isTooExpensiveToSearch(variable, false)) {
        registerPossibleProblem(variable.getNameIdentifier());
        return;
      }
      if (ignoreLocalVariables && variable instanceof PsiLocalVariable) {
        return;
      }
      if (ignorePrivateMethodsAndFields) {
        if (variable instanceof PsiField) {
          if (variable.hasModifierProperty(PsiModifier.PRIVATE)) {
            return;
          }
        }
      }
      if (variable instanceof PsiParameter parameter) {
        final PsiElement scope = parameter.getDeclarationScope();
        if (scope instanceof PsiMethod method) {
          if (ignorePrivateMethodsAndFields) {
            if (method.hasModifierProperty(PsiModifier.PRIVATE)) {
              return;
            }
          }
        }
        else if (ignoreLocalVariables) {
          return;
        }
      }
      final PsiType type = variable.getType();
      if (!CollectionUtils.isConcreteCollectionClass(type) || LibraryUtil.isOverrideOfLibraryMethodParameter(variable)) {
        return;
      }

      checkToWeaken(type, variable.getTypeElement(), variable);
    }
@Override
    public void visitVariable(@NotNull PsiVariable variable)