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:53:28 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]
Changes requested by asemenyuk (Reviewer).
src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WinFromOptions.java line 140:
> 138: // We should drop any characters. For example: "-ea".
> 139: return ver.toComponentsString();
> 140: }
Branching is redundant; it is equivalent to DottedVersion.lazy(version).trim(4).pad(2).toComponentsString()
test/jdk/tools/jpackage/helpers/jdk/jpackage/test/WindowsHelper.java line 32:
> 30: import java.lang.ref.SoftReference;
> 31: import java.lang.reflect.Method;
> 32: import java.math.BigInteger;
Redundant import
test/jdk/tools/jpackage/helpers/jdk/jpackage/test/WindowsHelper.java line 36:
> 34: import java.nio.file.Path;
> 35: import java.time.Instant;
> 36: import java.util.Arrays;
Redundant import
test/jdk/tools/jpackage/helpers/jdk/jpackage/test/WindowsHelper.java line 68:
> 66: } else {
> 67: return ver.toComponentsString();
> 68: }
Branching is redundant; it is equivalent to `DottedVersion.lazy(version).trim(4).pad(2).toComponentsString()`
-------------
PR Review: https://git.openjdk.org/jdk/pull/29260#pullrequestreview-3794903796
PR Review Comment: https://git.openjdk.org/jdk/pull/29260#discussion_r2802129151
PR Review Comment: https://git.openjdk.org/jdk/pull/29260#discussion_r2802131394
PR Review Comment: https://git.openjdk.org/jdk/pull/29260#discussion_r2802131960
PR Review Comment: https://git.openjdk.org/jdk/pull/29260#discussion_r2802128057
More information about the core-libs-dev
mailing list