@Override
    public void visitNewExpression(@NotNull PsiNewExpression expression) {
      super.visitNewExpression(expression);
      final PsiType type = expression.getType();
      if (type == null) {
        return;
      }
      final String canonicalText = type.getCanonicalText();
      if (!cachedNumberTypes.contains(canonicalText)) {
        return;
      }
      final PsiClass aClass = PsiUtil.getContainingClass(expression);
      if (aClass != null) {
        String qualifiedName = aClass.getQualifiedName();
        if (qualifiedName != null && cachedNumberTypes.contains(qualifiedName)) {
          return;
        }
      }
      final PsiExpressionList argumentList = expression.getArgumentList();
      if (argumentList == null) {
        return;
      }
      final PsiExpression[] arguments = argumentList.getExpressions();
      if (arguments.length != 1) {
        return;
      }
      final PsiExpression argument = arguments[0];
      final PsiType argumentType = argument.getType();
      if (argumentType == null || (ignoreStringArguments && argumentType.equalsToText(CommonClassNames.JAVA_LANG_STRING))) {
        return;
      }
      final PsiMethod method = expression.resolveMethod();
      if (method == null || (reportOnlyWhenDeprecated && !method.isDeprecated())) {
        return;
      }
      if (expression.getClassReference() == null) {
        return;
      }
      registerNewExpressionError(expression, expression);
    }
@Override
    public void visitNewExpression(@NotNull PsiNewExpression expression)