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

ZipFile.entries() can't handle empty zip entry names

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 9
    • 9
    • core-libs
    • None
    • b22
    • generic
    • generic
    • Verified

      Back in 2005, I wrote a jtreg test to ensure that ZipFile handles entries with empty names properly. But it only tested getEntry, and not the enumeration returned from entries(), which indeed ends up throwing a NullPointerException in that case. Here's a fix for the test, and for the code.

      Webrev: http://cr.openjdk.java.net/~martin/webrevs/openjdk9/ZipEntryEmptyName/

            martin Martin Buchholz
            martin Martin Buchholz
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: