diff --git a/java/java-psi-impl/src/com/intellij/codeInsight/javadoc/JavaDocInfoGenerator.java b/java/java-psi-impl/src/com/intellij/codeInsight/javadoc/JavaDocInfoGenerator.java index 18dbccb258c5..3c9e76151e1d 100644 --- a/java/java-psi-impl/src/com/intellij/codeInsight/javadoc/JavaDocInfoGenerator.java +++ b/java/java-psi-impl/src/com/intellij/codeInsight/javadoc/JavaDocInfoGenerator.java @@ -639,13 +639,15 @@ public class JavaDocInfoGenerator { String text = o.toString(); PsiType type = variable.getType(); if (type.equalsToText(CommonClassNames.JAVA_LANG_STRING)) { - text = "\"" + StringUtil.escapeLineBreak(StringUtil.shortenPathWithEllipsis(text, 120)) + "\""; + text = "\"" + StringUtil.escapeStringCharacters(StringUtil.shortenPathWithEllipsis(text, 120)) + "\""; + } + else if (type.equalsToText("char")) { + text = "'" + text + "'"; } - else if (type.equalsToText("char")) text = "'" + text + "'"; try { return instance.getElementFactory().createExpressionFromText(text, variable); } catch (IncorrectOperationException ex) { - LOG.error(text, ex); + LOG.info("type:" + type.getCanonicalText() + "; text: " + text, ex); } } }