RFR: 8357404: jpackage should attempt to get a package version from the JDK's release file if the --version option is not specified [v12]

Alexey Semenyuk asemenyuk at openjdk.org
Fri Feb 13 03:44:11 UTC 2026


On Fri, 13 Feb 2026 03:32:17 GMT, Alexander Matveev <almatvee at openjdk.org> wrote:

>> - Version will be read from JDK's release file if not provided via `--version` for runtime installer.
>> - Added test to cover added functionality.
>> - On macOS and Windows version from JDK's release file will be normalized if it does not fit platform requirements.
>
> Alexander Matveev has updated the pull request incrementally with one additional commit since the last revision:
> 
>   8357404: jpackage should attempt to get a package version from the JDK's release file if the --version option is not specified [v10]

src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacFromOptions.java line 71:

> 69: import jdk.jpackage.internal.cli.StandardFaOption;
> 70: import jdk.jpackage.internal.model.Application;
> 71: import jdk.jpackage.internal.model.DottedVersion;

Looks like all newly added imports except for DottedVersion are redundant

src/jdk.jpackage/share/classes/jdk/jpackage/internal/FromOptions.java line 51:

> 49: import java.io.UncheckedIOException;
> 50: import java.nio.file.Path;
> 51: import java.util.Arrays;

I think these new imports are redundant

src/jdk.jpackage/share/classes/jdk/jpackage/internal/FromOptions.java line 145:

> 143:     }
> 144: 
> 145: 

Redundant new line change

src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WinFromOptions.java line 46:

> 44: import static jdk.jpackage.internal.model.StandardPackageType.WIN_MSI;
> 45: 
> 46: import java.util.function.UnaryOperator;

This import is redundant

test/jdk/tools/jpackage/helpers/jdk/jpackage/test/JPackageCommand.java line 37:

> 35: import java.io.IOException;
> 36: import java.io.UncheckedIOException;
> 37: import java.io.Writer;

Redundant import

test/jdk/tools/jpackage/helpers/jdk/jpackage/test/JPackageCommand.java line 54:

> 52: import java.util.Optional;
> 53: import java.util.OptionalInt;
> 54: import java.util.Properties;

Redundant import

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/29260#discussion_r2802109086
PR Review Comment: https://git.openjdk.org/jdk/pull/29260#discussion_r2802115154
PR Review Comment: https://git.openjdk.org/jdk/pull/29260#discussion_r2802112958
PR Review Comment: https://git.openjdk.org/jdk/pull/29260#discussion_r2802117084
PR Review Comment: https://git.openjdk.org/jdk/pull/29260#discussion_r2802118431
PR Review Comment: https://git.openjdk.org/jdk/pull/29260#discussion_r2802118722


More information about the core-libs-dev mailing list