String (PsiExpression arg, CommentTracker ct) { if (arg instanceof PsiLiteralExpression literal && !TypeUtils.isJavaLangString(arg.getType())) { Object value = literal.getValue(); if (value instanceof Character) { return PsiLiteralUtil.stringForCharLiteral(literal.getText()); } return StringUtil.wrapWithDoubleQuote(StringUtil.escapeStringCharacters(String.valueOf(value))); } if (TypeUtils.isJavaLangString(arg.getType()) && NullabilityUtil.getExpressionNullability(arg, true) == Nullability.NOT_NULL) { return ct.text(arg, ParenthesesUtils.METHOD_CALL_PRECEDENCE); } return CommonClassNames.JAVA_LANG_STRING + ".valueOf(" + ct.text(arg) + ")"; }