RFR: 8215788: Clarify JarInputStream Manifest access
Lance Andersen
lancea at openjdk.org
Tue Sep 13 17:24:47 UTC 2022
On Wed, 31 Aug 2022 19:13:05 GMT, Weijun Wang <weijun at openjdk.org> wrote:
>> The challenge I had with the wording is due to the fact that if "META-INF/" is the first entry in the Zip file, it will not be returned regardless of whether there is a manifest. So open to suggestions.
>
> That's right. But I think we care about the MANIFEST more. It's not that important whether META-INF is there.
True we do care more about the manifest, but was also trying to address the difference between ZipInputStream which will always return both entries regardless of location
We also have the case such where you the 1st entry in the jar is a normal file and the 2nd entry is the manifest., getManifest() will return null.
I guess I could say:
_"getManifest will return the Manifest if it is the first entry or META-INF/ is the first entry and the Manifest is the second entry within the Jar file. For all cases, getManifest will return null."
Is the above any better?
-------------
PR: https://git.openjdk.org/jdk/pull/10045
More information about the security-dev
mailing list