On Thu, 5 Feb 2026 17:19:48 GMT, Alexey Semenyuk <[email protected]> wrote:

>> 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 [v8]
>
> src/jdk.jpackage/macosx/classes/jdk/jpackage/internal/MacFromOptions.java 
> line 367:
> 
>> 365:             return ver.toComponentsString();
>> 366:         }
>> 367:     }
> 
> Why branching?
> 
> It can be as simple as:
> 
> DottedVersion.lazy(version).trim(3).pad(3).toComponentsString()
> 
> 
> The same comment applies to other locations where `trim()` and `pad()` are 
> used.

1, 2 and 3 components are valid for macOS. I do not see a point to normalized 
valid versions. For example if we packaging JDK 27, then file name will be 
myJDK-27.dmg, but if we normalize to 3 components always it will be 
myJDK-27.0.0.dmg.

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

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

Reply via email to