- 
    Type:
Bug
 - 
    Resolution: Fixed
 - 
    Priority:
  P5                     
     - 
    Affects Version/s: 1.2.0, 8, 11, 12
 - 
    Component/s: core-libs
 
- 
        b18
 - 
        x86_64
 - 
        windows_10
 - 
        Verified
 
                    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
            
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
- csr for
 - 
                    
JDK-8293753 Clarify JarInputStream Manifest access
-         
     - Closed
 
 -         
 
- duplicates
 - 
                    
JDK-8292804 Clarify JarInputStream signed jar verification when the MANIFEST.MF is not the first/second entry in the jar
-         
     - Closed
 
 -         
 
- relates to
 - 
                    
JDK-5046178 JarInputStream doesn't return Manifest object
-         
     - Closed
 
 -         
 - 
                    
JDK-8292804 Clarify JarInputStream signed jar verification when the MANIFEST.MF is not the first/second entry in the jar
-         
     - Closed
 
 -         
 
             (1 links to)