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

ZipInputStream does not throw exception on non ZIP files

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P4 P4
    • None
    • 1.1.5
    • tools
    • jar
    • x86
    • windows_nt



      Name: zl72593 Date: 11/17/98


      You can construct a ZipInputStream on a non ZIP
      file (e.g. a Unix executable). The getNextEntry()
      does not throw an IOException - it just returns
      null. Somewhere along the way surely a
      ZipException should be thrown! You do get an
      exception eventually if you use a corrupted
      ZIP file.

      I tried using ZipFile instead which throws an IO
      exception alright but fails to close the file
      (bug number 4102690 - how about getting around
      to the one line fix that requires!!!).

      I believe these problems still exists in JDK 1.2 beta 2
      so the new JarVerifier class would also be impacted.
      (Review ID: 27595)
      ======================================================================

            zlisunw Zhenghua Li (Inactive)
            zlisunw Zhenghua Li (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: