String (@Nullable String comment) { if (comment == null) return null; String[] lines = StringUtil.splitByLines(XmlStringUtil.escapeString(comment), false); String croppedMessage = of(lines).limit(5).joining(UIUtil.BR); return lines.length > 5 ? croppedMessage + "..." : croppedMessage; }