void (@NotNull PsiMethodCallExpression expression) { super.visitMethodCallExpression(expression); final PsiReferenceExpression methodExpression = expression.getMethodExpression(); @NonNls final String methodName = methodExpression.getReferenceName(); if (!HardcodedMethodConstants.EQUALS.equals(methodName) && !HardcodedMethodConstants.EQUALS_IGNORE_CASE.equals(methodName)) { return; } final PsiExpression[] arguments = expression.getArgumentList().getExpressions(); if (arguments.length != 1) { return; } final PsiExpression argument = arguments[0]; if (!(PsiUtil.skipParenthesizedExprDown(argument) instanceof PsiLiteralExpression)) { return; } if (!TypeUtils.isJavaLangString(argument.getType())) { return; } final PsiExpression qualifier = PsiUtil.skipParenthesizedExprDown(methodExpression.getQualifierExpression()); if (qualifier == null || qualifier instanceof PsiLiteralExpression) { return; } if (!TypeUtils.isJavaLangString(qualifier.getType())) { return; } registerError(argument, methodName); }