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

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b22
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      Description

      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/

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: