RFR: 8215788: Clarify JarInputStream Manifest access [v11]
Lance Andersen
lancea at openjdk.org
Tue Sep 20 18:12:07 UTC 2022
On Tue, 20 Sep 2022 17:47:03 GMT, Lance Andersen <lancea at openjdk.org> wrote:
>> Please review this PR which updates the JarInputStream class description to clarify when the Manifest is accessible via JarInputStream::getManifest and JarInputStream::get[Jar]Entry.
>>
>> It is worth noting that with this update, we are finally documenting behavior that dates back to when this class was added to JDK 1.2
>>
>>
>> Best,
>> Lance
>
> Lance Andersen has updated the pull request incrementally with one additional commit since the last revision:
>
> More wordsmithing to the signed jar section
Alan,
Assuming we are set with the other changes, did you want to add the following paragraph (or similar) at line 58 to make it clear that if the Manifest is not found, then the JarEntry attributes will not be available:
* <p>
* The {@code Manifest} for a JAR file may include
* <a href="{@docRoot}/../specs/jar/jar.html#main-attributes">main</a> and
* <a href="{@docRoot}/../specs/jar/jar.html#per-entry-attributes">per entry</a>
* attributes. {@link JarEntry#getAttributes()} will return the per entry
* attributes for the current JAR file entry, if any, providing
* the {@code Manifest} is the first or second entry in the stream as described
* above.
* </p>
*
If you have alternate wording, that is fine or we can leave it out entirely.
Hopefully this is the last piece to the update to resolve
Thank you (all) for your time and input
-------------
PR: https://git.openjdk.org/jdk/pull/10045
More information about the core-libs-dev
mailing list