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

Clarify JarInputStream Manifest access

    XMLWordPrintable

Details

    • b18
    • x86_64
    • windows_10
    • Verified

    Description

      A DESCRIPTION OF THE PROBLEM :
      If MANIFTEST.MF is not the first (or second) entry in a .jar-file, JarFileInputStream does not find the MANIFEST.MF.

      It should be better documented (in JavaDoc-comment), that it checks only the first (two) entries so that the result of null of getManifest()-method does not explicit mean, that there is not any MANIFEST.MF.

      As for a RFE the class could offer a convenience setting, that it checks for that on every call to getNextEntry() and when found, populate the internal Manifest-variable so that after all entries were scanned, getManifest()'s result really shows if there is or is not an MANIFEST.MF in the jar.


      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      create a .jar, where the MANIFEST.MF is not one of the first two entries (any normal Zip-Programm could do that)


      FREQUENCY : always


      Attachments

        Issue Links

          Activity

            People

              lancea Lance Andersen
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: