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

Solaris Core Dump - NT - "Memory could not be read" using java.util.zip.ZipFile

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.0
    • 1.3.0
    • core-libs
    • beta
    • generic, x86
    • generic, windows_2000



      Name: skT88420 Date: 11/10/99


      java version "1.2.2"
      Classic VM (build JDK-1.2.2-W, native threads, symcjit)


      Core dump occurs when you try to use an enumeration returned from a
      ZipFile.entries() method if you try to access the enumeration after closing the
      ZipFile.

      This should throw an IllegalStateException if the ZipFile has been closed.

      public static void main(String[] args) {
        try {
          File f = new File("empty.zip");
          ZipFile zip = new ZipFile(f);

          Enumeration e = zip.entries();

          zip.close();
            
          for (; e.hasMoreElements();) {
           System.out.println("Entry Name: " + ((ZipEntry)e.nextElement()).getName());
          }
        } catch (Exception ex) {
            ex.printStackTrace();
        }
      }
      (Review ID: 97692)
      ======================================================================

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: