code: public static String escapeXMLComment(String content)
      {
          StringBuffer str = new StringBuffer(content.length());
  
          char[] buff = content.toCharArray();
          char lastChar = 0;
          for (char c : buff) {
              if (c == '\\') {
                  str.append('\\');
              } else if (c == '-' && lastChar == '-') {
                  str.append('\\');
              }
  
              str.append(c);
              lastChar = c;
          }
  
          if (lastChar == '-') {
              str.append('\\');
          }
  
          return str.toString();
      }
docs: XML comment does not support some characters inside its content but there is no official escaping/unescaping for
  it so we made our own.
  <ul>
  <li>1) Escape existing \</li>
  <li>2) Escape --</li>
  <li>3) Add {@code \} (unescaped as {@code ""}) at the end if the last char is {@code -}</li>
  </ul>
  
  @param content the XML comment content to escape
  @return the escaped content.
  @since 1.9M2