@Override
    public void visitMethod(@NotNull PsiMethod method) {
      // note: no call to super
      if (!MethodUtils.methodMatches(method, CommonClassNames.JAVA_UTIL_ITERATOR, null, HardcodedMethodConstants.HAS_NEXT) &&
          !MethodUtils.methodMatches(method, "java.util.ListIterator", null, "hasPrevious")) {
        return;
      }
      PsiMethodCallExpression call = IteratorUtils.getIllegalCallInHasNext(method, null, true);
      if (call == null) {
        return;
      }
      registerMethodCallError(call, method.getName());
    }
@Override
    public void visitMethod(@NotNull PsiMethod method)