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

(zipfs) ZipFSOutputStreamTest.testOutputStream should only check inflated bytes

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 19
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b16

      Description

      The test ZipFSOutputStreamTest deflates content into a zip file system and subsequently inflates the deflated files and checks their content against the original data.

      The content consists of a data stream of bytes with the value `42`.

      The check currently compares the temporary inflation buffer with the original source buffer, no matter how many bytes were inflated into the inflation buffer. This can lead to problems with alternative zlib implementations which sometimes write beyond the last inflated byte (see JDK-8282648 for more details).

      The fix is trivial. Only compare as many bytes as have been inflated against the original content.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              simonis Volker Simonis
              Reporter:
              simonis Volker Simonis
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: