mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8273826: Correct Manifest file name and NPE checks
Reviewed-by: weijun, hchao, mullan
This commit is contained in:
parent
722d639fad
commit
03a8d342b8
5 changed files with 137 additions and 11 deletions
|
@ -749,7 +749,7 @@ public class JarFile extends ZipFile {
|
|||
}
|
||||
if (mev == null) {
|
||||
mev = new ManifestEntryVerifier
|
||||
(getManifestFromReference());
|
||||
(getManifestFromReference(), jv.manifestName);
|
||||
}
|
||||
if (name.equalsIgnoreCase(MANIFEST_NAME)) {
|
||||
b = jv.manifestRawBytes;
|
||||
|
|
|
@ -95,7 +95,7 @@ public class JarInputStream extends ZipInputStream {
|
|||
closeEntry();
|
||||
if (doVerify) {
|
||||
jv = new JarVerifier(e.getName(), bytes);
|
||||
mev = new ManifestEntryVerifier(man);
|
||||
mev = new ManifestEntryVerifier(man, jv.manifestName);
|
||||
}
|
||||
return (JarEntry)super.getNextEntry();
|
||||
}
|
||||
|
|
|
@ -444,7 +444,7 @@ class JarVerifier {
|
|||
{
|
||||
this.is = Objects.requireNonNull(is);
|
||||
this.jv = jv;
|
||||
this.mev = new ManifestEntryVerifier(man);
|
||||
this.mev = new ManifestEntryVerifier(man, jv.manifestName);
|
||||
this.jv.beginEntry(je, mev);
|
||||
this.numLeft = je.getSize();
|
||||
if (this.numLeft == 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue