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

ZipExceptions when reusing ZipEntry objects

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: 5.0u7
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:
      None

      Description

      In JDK 1.5.0 Update 7, it is not possible to use
      ZipOutputStream.putNextEntry(new ZipEntry(ze)), if the object "ze" has been used in a different Zip stream with different compression level. If one tries to do this, a java.util.zip.ZipException is
      thrown with message text "invalid entry compressed size (expected 22 but got 25 bytes)".

      One soln that worked is to use ZipOutputStream.putNextEntry(new ZipEntry(ze.getName())) instad. But the ISV would like to know when the original problem will be solved.

      The attached sample program ZipEntryProblem.java illustrates the problem.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              vabhat Vasanth Bhat
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: