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

Doc for Zip/JarInputStream .getNextEntry() needs to explain how to detect end

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.4.2
    • core-libs



      Name: rmT116609 Date: 04/30/2003


      A DESCRIPTION OF THE PROBLEM :
      java.util.zip.ZipInputStream.getNextEntry
      java.util.jar.JarInputStream.getNextEntry
      java.util.jar.JarInputStream.getNextJarEntry

      Need to explain how to detect end of entries.
      Not clear whether supposed to check for available(), check for null, catch an EOFException, or if there is some other method I overlooked.

      http://java.sun.com/j2se/1.4.2/docs/api/java/util/zip/ZipInputStream.html#getNextEntry()
      http://java.sun.com/j2se/1.4.2/docs/api/java/util/jar/JarInputStream.html#getNextEntry()
      http://java.sun.com/j2se/1.4.2/docs/api/java/util/jar/JarInputStream.html#getNextJarEntry()


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      [doc should say something like]

      Returns:
          the ZipEntry just read, or null if there are no more entries.
      [doc says]

      Returns:
          the ZipEntry just read.


      (Review ID: 185114)
      ======================================================================

            bristor Dave Bristor (Inactive)
            rmandalasunw Ranjith Mandala (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: