RFR: 8293499: Provide jmod --compress option [v3]
Aleksey Shipilev
shade at openjdk.org
Tue Sep 13 07:42:39 UTC 2022
On Mon, 12 Sep 2022 18:51:28 GMT, Mandy Chung <mchung at openjdk.org> wrote:
>> Aleksey Shipilev has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Adopt "--compress zip-[0-9]" as option format
>
> src/jdk.jlink/share/classes/jdk/tools/jmod/JmodOutputStream.java line 58:
>
>> 56: * returning the output stream to write to the JMOD file.
>> 57: */
>> 58: static JmodOutputStream newOutputStream(Path file, LocalDateTime date, int compLevel) throws IOException {
>
> Suggest to name this parameter `compressLevel` to make it clear.
Sure, renamed.
> src/jdk.jlink/share/classes/jdk/tools/jmod/JmodTask.java line 171:
>
>> 169: Path extractDir;
>> 170: LocalDateTime date;
>> 171: int compLevel;
>
> s/compLevel/compressLevel/
Renamed.
> src/jdk.jlink/share/classes/jdk/tools/jmod/JmodTask.java line 1191:
>
>> 1189: if (idx != lastIdx) {
>> 1190: throw new CommandException("err.compress.incorrect", value);
>> 1191: }
>
> what about checking `value.substring(0, idx)` is "zip"?
Right, missed that! Fixed in new commit.
> test/jdk/tools/jmod/JmodTest.java line 807:
>
>> 805: jmod("create",
>> 806: "--class-path", cp,
>> 807: "--compress", "test",
>
> good to have a test case verifying "test-0" value.
Yes, added.
-------------
PR: https://git.openjdk.org/jdk/pull/10213
More information about the core-libs-dev
mailing list