Uploaded image for project: 'WildFly Elytron'
  1. WildFly Elytron
  2. ELY-139

Appending into ByteStringBuilder fail if initial array blank

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Minor
    • None
    • None
    • None
    • None

    Description

      ByteStringBuilder cannot append codepoints 0xD8xx (lonely surrogates). It should - StringBuilder.appendCodePoint() work with it.
      (Problem is only with uncomplete/nonvalid unicode strings, so it is not critical problem.)

      Mentioned in: https://github.com/wildfly-security/wildfly-elytron/pull/101

      UPDATE:
      ByteStringBuilder encode surrogates correctly by RFC3629 (if we ignore they are prohibited because they are reserved for UTF-16). Conversly StringBuilder and (char) operator encode D800-D8FF bad as 3F.

      Problem is only in appending into ByteStringBuilder constructed as:

          new ByteStringBuilder(new byte[]{});
      

      Attachments

        Activity

          People

            jkalina@redhat.com Jan Kalina (Inactive)
            jkalina@redhat.com Jan Kalina (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: