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

JarInputStream could not locate MANIFEST.MF when it is not the first/second entry in the jar

    Details

      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

          Activity

            People

            • Assignee:
              lancea Lance Andersen
              Reporter:
              webbuggrp Webbug Group
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: