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

ZipFile close() can send ZipFile objects into inconsistent states.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.2.0
    • 1.2.0
    • core-libs
    • None
    • 1.2beta4
    • generic, sparc
    • generic, solaris_2.5
    • Not verified


      allan.jacobs@Eng 1998-01-05
      (1) The ZipFile methods getEntry(String) continues to work and should
      not after ZipFile.close().
      (2) The ZipFile methods getInputStream(ZipEntry), entries(),
      read(long,byte[],int,int), and read(long) get NullPointer exceptions
      when used after ZipFile.close().
      (3) The ZipFileInputStream methods read(byte[],int,int) and read()
      return -1 after ZipFile.close() has been called.
      (4) ZipFile.close() should be synchronized in case one of the read
      methods is called from another thread.

      A suggested fix is supplied.

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: