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

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 1.2.0
    • Fix Version/s: 1.2.0
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      1.2beta4
    • CPU:
      generic, sparc
    • OS:
      generic, solaris_2.5
    • Verification:
      Not verified

      Description


      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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: