void (@NotNull PsiMethodCallExpression expression) { super.visitMethodCallExpression(expression); final PsiReferenceExpression methodExpression = expression.getMethodExpression(); final String methodName = methodExpression.getReferenceName(); final Map<String, String> basicTypeMap = s_basicTypeMap; if (!basicTypeMap.containsValue(methodName)) { return; } final PsiExpression qualifier = methodExpression.getQualifierExpression(); if (!(qualifier instanceof PsiNewExpression newExpression)) { return; } final PsiExpressionList argumentList = newExpression.getArgumentList(); if (argumentList == null) { return; } final PsiExpression[] arguments = argumentList.getExpressions(); if (arguments.length != 1) { return; } final PsiType argumentType = arguments[0].getType(); if (!TypeUtils.isJavaLangString(argumentType)) { return; } final PsiType type = qualifier.getType(); if (type == null) { return; } final String typeText = type.getCanonicalText(); if (!basicTypeMap.containsKey(typeText)) { return; } final String mappingMethod = basicTypeMap.get(typeText); if (!mappingMethod.equals(methodName)) { return; } registerMethodCallError(expression, expression); }