void (@NotNull PsiMethodCallExpression expression) { super.visitMethodCallExpression(expression); if (!ExpressionUtils.isStringConcatenationOperand(expression)) { return; } final PsiReferenceExpression methodExpression = expression.getMethodExpression(); final String referenceName = methodExpression.getReferenceName(); if (!HardcodedMethodConstants.TO_STRING.equals(referenceName)) { return; } final PsiMethod method = expression.resolveMethod(); if (method == null) { return; } final PsiParameterList parameterList = method.getParameterList(); if (!parameterList.isEmpty()) { return; } final PsiClass aClass = method.getContainingClass(); if (aClass == null) { return; } final String className = aClass.getQualifiedName(); if (!CommonClassNames.JAVA_LANG_STRING_BUFFER.equals(className) && !CommonClassNames.JAVA_LANG_STRING_BUILDER.equals(className)) { return; } registerMethodCallError(expression, aClass.getName()); }