@Override
    public void visitIfStatement(@NotNull PsiIfStatement statement) {
      super.visitIfStatement(statement);
      final PsiExpression condition = PsiUtil.skipParenthesizedExprDown(statement.getCondition());
      if (condition == null || statement.getElseBranch() != null || getThrownNewException(statement.getThenBranch()) == null) {
        return;
      }
      final boolean isObjectsRequireNonNullAvailable = PsiUtil.isAvailable(JavaFeature.OBJECTS_CLASS, statement) &&
                                                       ComparisonUtils.isNullComparison(condition) &&
                                                       ((PsiBinaryExpression)condition).getOperationTokenType() == JavaTokenType.EQEQ;
      registerStatementError(statement, isObjectsRequireNonNullAvailable, true);
    }
@Override
    public void visitIfStatement(@NotNull PsiIfStatement statement)