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

Alexey Semenyuk asemenyuk at openjdk.org
Fri Jan 16 04:30:14 UTC 2026


On Fri, 16 Jan 2026 04:08:43 GMT, Alexander Matveev <almatvee at openjdk.org> wrote:

>> test/jdk/tools/jpackage/helpers/jdk/jpackage/test/MacHelper.java line 765:
>> 
>>> 763: 
>>> 764:     static String getNormalizedVersion(JPackageCommand cmd, String version) {
>>> 765:         cmd.verifyIsOfType(PackageType.MAC);
>> 
>> The JPackageCommand instance is unrelated to the version string and is used only to check that it is configured for Mac. It doesn't supply any information required by the method to operate. The method should take a single parameter - a version string.
>> 
>> Why does the MacHelper class have this method, though jpackage doesn't do version normalization on macOS?
>
> I added it to reduce to 3 components due to `MacApplicationBuilder.validateAppVersion()`. Mac packages does not require 3 component version, so maybe this logic by normalizing application version should change.

Sorry, I still don't get it. jpackage doesn't run normalization on the version it reads from the "release" file, right? Why does the testing code do it?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/29260#discussion_r2696858526


More information about the core-libs-dev mailing list