Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8351567

Jar Manifest test ValueUtf8Coding produces misleading diagnostic output

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 25
    • 25
    • core-libs
    • master

      The Jar testing of UTF8 Manifest in ValueUtf8Voding produces misleading output and possible UTF8DataFormatExceptions.
      The diagnostic output is not relevant to the test success or failure.

      The test writes the manifest to a ByteArrayOutputStream and then naively attempts to create a single string from the byte array.
      However, the manifest uses a 70 column format with continuation lines.
      The continuation format may break the multi-character utf8 sequence across lines, causing either a UTF8DataFormatException or the insertion of replacement characters '\ufffd'.

      Frequently, the output contains mostly replacement characters due to this mis-interpretation and is useless.

            rriggs Roger Riggs
            rriggs Roger Riggs
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: